-docker-opensbi:
- stage: containers
- rules: # Only run this job when the Dockerfile is modified
+# All jobs needing docker-opensbi must use the same rules it uses.
+.opensbi_job_rules:
+ rules: # Only run this job when ...
- changes:
+ # this file is modified
- .gitlab-ci.d/opensbi.yml
+ # or the Dockerfile is modified
- .gitlab-ci.d/opensbi/Dockerfile
- when: always
+ when: on_success
+ - changes: # or roms/opensbi/ is modified (submodule updated)
+ - roms/opensbi/*
+ when: on_success
+ - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 'opensbi'
+ when: on_success
+ - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i' # or last commit description contains 'OpenSBI'
+ when: on_success
+
+docker-opensbi:
+ extends: .opensbi_job_rules
+ stage: containers
image: docker:19.03.1
services:
- docker:19.03.1-dind
- docker push $IMAGE_TAG
build-opensbi:
+ extends: .opensbi_job_rules
stage: build
- rules: # Only run this job when ...
- - changes: # ... roms/opensbi/ is modified (submodule updated)
- - roms/opensbi/*
- when: always
- - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 'opensbi'
- when: always
- - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i' # or last commit description contains 'OpenSBI'
- when: always
+ needs: ['docker-opensbi']
artifacts:
paths: # 'artifacts.zip' will contains the following files:
- pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
- - pc-bios/opensbi-riscv32-generic-fw_dynamic.elf
- pc-bios/opensbi-riscv64-generic-fw_dynamic.bin
- - pc-bios/opensbi-riscv64-generic-fw_dynamic.elf
- opensbi32-generic-stdout.log
- opensbi32-generic-stderr.log
- opensbi64-generic-stdout.log