3 rules: # Only run this job when the Dockerfile is modified
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
27 rules: # Only run this job when ...
28 - changes: # ... roms/edk2/ is modified (submodule updated)
31 - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
33 - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
36 paths: # 'artifacts.zip' will contains the following files:
38 - pc-bios/edk2-licenses.txt
41 image: $CI_REGISTRY_IMAGE:edk2-cross-build
44 script: # Clone the required submodules and build EDK2
45 - git submodule update --init roms/edk2
46 - git -C roms/edk2 submodule update --init
47 - export JOBS=$(($(getconf _NPROCESSORS_ONLN) + 1))
48 - echo "=== Using ${JOBS} simultaneous jobs ==="
49 - make -j${JOBS} -C roms efi 2>&1 1>edk2-stdout.log | tee -a edk2-stderr.log >&2