3 rules: # Only run this job when the Dockerfile is modified
5 - .gitlab-ci.d/edk2.yml
6 - .gitlab-ci.d/edk2/Dockerfile
13 IMAGE_TAG: $CI_REGISTRY_IMAGE:edk2-cross-build
15 DOCKER_HOST: tcp://docker:2375
16 DOCKER_TLS_CERTDIR: ""
18 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
20 - docker pull $IMAGE_TAG || true
21 - docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
22 --tag $IMAGE_TAG .gitlab-ci.d/edk2
23 - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
24 - docker push $IMAGE_TAG
28 rules: # Only run this job when ...
29 - changes: # ... roms/edk2/ is modified (submodule updated)
32 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
34 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
37 paths: # 'artifacts.zip' will contains the following files:
39 - pc-bios/edk2-licenses.txt
42 image: $CI_REGISTRY_IMAGE:edk2-cross-build
45 script: # Clone the required submodules and build EDK2
46 - git submodule update --init roms/edk2
47 - git -C roms/edk2 submodule update --init
48 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
49 - echo "=== Using ${JOBS} simultaneous jobs ==="
50 - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2