Message ID | 20201110121606.2792442-2-philmd@redhat.com |
---|---|
State | New |
Headers | show |
Series | gitlab-ci: Fix EDK2 & OpenSBI jobs | expand |
$SUBJECT seems to contradict the comment message and code. Shouldn't it say "always run the OpenSBI job" since you're removing all the conditional logic ? On Tue, Nov 10, 2020 at 01:16:05PM +0100, Philippe Mathieu-Daudé wrote: > The OpenSBI jobs use the 'changes' keyword, which "makes it > possible to define if a job should be created based on files > modified by a Git push event." (see [*]). This keyword comes > with a warning: > > Caution: > > In pipelines with sources other than the three above > changes can’t determine if a given file is new or old > and always returns true." > > In commit 922febe2af we moved the YAML config file from the > repository root directory to the .gitlab-ci.d/ directory. > > We didn't respect the previous warning and disabled the > 'changes' filter rule, as the files are now in a (directory) > three above the YAML config file. > > As this job doesn't take much (less than 1min), run it by > default. > > [*] https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges > > Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder") > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > .gitlab-ci.d/opensbi.yml | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml > index 5b13047e2ab..b1fa244fda4 100644 > --- a/.gitlab-ci.d/opensbi.yml > +++ b/.gitlab-ci.d/opensbi.yml > @@ -1,10 +1,5 @@ > docker-opensbi: > stage: containers > - rules: # Only run this job when the Dockerfile is modified > - - changes: > - - .gitlab-ci.d/opensbi.yml > - - .gitlab-ci.d/opensbi/Dockerfile > - when: always > image: docker:19.03.1 > services: > - docker:19.03.1-dind > @@ -25,14 +20,6 @@ docker-opensbi: > > build-opensbi: > 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 > artifacts: > paths: # 'artifacts.zip' will contains the following files: > - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin > -- > 2.26.2 > Regards, Daniel
On 11/10/20 3:33 PM, Daniel P. Berrangé wrote: > $SUBJECT seems to contradict the comment message and code. > > Shouldn't it say "always run the OpenSBI job" since you're > removing all the conditional logic ? Sorry, bad copy/paste from previous patch. > > On Tue, Nov 10, 2020 at 01:16:05PM +0100, Philippe Mathieu-Daudé wrote: >> The OpenSBI jobs use the 'changes' keyword, which "makes it >> possible to define if a job should be created based on files >> modified by a Git push event." (see [*]). This keyword comes >> with a warning: >> >> Caution: >> >> In pipelines with sources other than the three above >> changes can’t determine if a given file is new or old >> and always returns true." >> >> In commit 922febe2af we moved the YAML config file from the >> repository root directory to the .gitlab-ci.d/ directory. >> >> We didn't respect the previous warning and disabled the >> 'changes' filter rule, as the files are now in a (directory) >> three above the YAML config file. >> >> As this job doesn't take much (less than 1min), run it by >> default. >> >> [*] https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges >> >> Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder") >> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> >> --- >> .gitlab-ci.d/opensbi.yml | 13 ------------- >> 1 file changed, 13 deletions(-) >> >> diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml >> index 5b13047e2ab..b1fa244fda4 100644 >> --- a/.gitlab-ci.d/opensbi.yml >> +++ b/.gitlab-ci.d/opensbi.yml >> @@ -1,10 +1,5 @@ >> docker-opensbi: >> stage: containers >> - rules: # Only run this job when the Dockerfile is modified >> - - changes: >> - - .gitlab-ci.d/opensbi.yml >> - - .gitlab-ci.d/opensbi/Dockerfile >> - when: always >> image: docker:19.03.1 >> services: >> - docker:19.03.1-dind >> @@ -25,14 +20,6 @@ docker-opensbi: >> >> build-opensbi: >> 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 >> artifacts: >> paths: # 'artifacts.zip' will contains the following files: >> - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin >> -- >> 2.26.2 >> > > Regards, > Daniel >
diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index 5b13047e2ab..b1fa244fda4 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -1,10 +1,5 @@ docker-opensbi: stage: containers - rules: # Only run this job when the Dockerfile is modified - - changes: - - .gitlab-ci.d/opensbi.yml - - .gitlab-ci.d/opensbi/Dockerfile - when: always image: docker:19.03.1 services: - docker:19.03.1-dind @@ -25,14 +20,6 @@ docker-opensbi: build-opensbi: 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 artifacts: paths: # 'artifacts.zip' will contains the following files: - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin
The OpenSBI jobs use the 'changes' keyword, which "makes it possible to define if a job should be created based on files modified by a Git push event." (see [*]). This keyword comes with a warning: Caution: In pipelines with sources other than the three above changes can’t determine if a given file is new or old and always returns true." In commit 922febe2af we moved the YAML config file from the repository root directory to the .gitlab-ci.d/ directory. We didn't respect the previous warning and disabled the 'changes' filter rule, as the files are now in a (directory) three above the YAML config file. As this job doesn't take much (less than 1min), run it by default. [*] https://docs.gitlab.com/ee/ci/yaml/#onlychangesexceptchanges Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- .gitlab-ci.d/opensbi.yml | 13 ------------- 1 file changed, 13 deletions(-)