Message ID | 20210418233448.1267991-9-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | gitlab-ci: Allow forks to use different pipelines than mainstream | expand |
On 19/04/2021 01.34, Philippe Mathieu-Daudé wrote: > Extract the DCO / checkpatch jobs to a new file (checks.yml) > to be able to run them without having to run all the jobs > included in the default .gitlab-ci.yml, which are mainly useful > for mainstream CI. > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > .gitlab-ci.d/checks.yml | 24 ++++++++++++++++++++++++ > .gitlab-ci.yml | 1 + > 2 files changed, 25 insertions(+) > create mode 100644 .gitlab-ci.d/checks.yml > > diff --git a/.gitlab-ci.d/checks.yml b/.gitlab-ci.d/checks.yml > new file mode 100644 > index 00000000000..f695627b7cd > --- /dev/null > +++ b/.gitlab-ci.d/checks.yml > @@ -0,0 +1,24 @@ > +check-patch: > + stage: build > + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest > + needs: > + job: amd64-centos8-container > + script: .gitlab-ci.d/check-patch.py > + except: > + variables: > + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' > + variables: > + GIT_DEPTH: 1000 > + allow_failure: true > + > +check-dco: > + stage: build > + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest > + needs: > + job: amd64-centos8-container > + script: .gitlab-ci.d/check-dco.py > + except: > + variables: > + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' > + variables: > + GIT_DEPTH: 1000 > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index bf4862a78de..ba35b3917e7 100644 > --- a/.gitlab-ci.yml > +++ b/.gitlab-ci.yml > @@ -12,6 +12,7 @@ include: > - local: '/.gitlab-ci.d/opensbi.yml' > - local: '/.gitlab-ci.d/containers.yml' > - local: '/.gitlab-ci.d/crossbuilds.yml' > + - local: '/.gitlab-ci.d/checks.yml' > > .native_build_job_template: > stage: build > You added the new file, but it looks like you did not remove the jobs from the main .gitlab-ci.yml file ? ... that looks like a mistake? Also, "checks.yml" sounds a little bit too generic. Maybe rather name it "style-check.yml" or something similar? Thomas
On 4/19/21 2:26 AM, Thomas Huth wrote: > On 19/04/2021 01.34, Philippe Mathieu-Daudé wrote: >> Extract the DCO / checkpatch jobs to a new file (checks.yml) >> to be able to run them without having to run all the jobs >> included in the default .gitlab-ci.yml, which are mainly useful >> for mainstream CI. >> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >> --- >> .gitlab-ci.d/checks.yml | 24 ++++++++++++++++++++++++ >> .gitlab-ci.yml | 1 + >> 2 files changed, 25 insertions(+) >> create mode 100644 .gitlab-ci.d/checks.yml >> >> diff --git a/.gitlab-ci.d/checks.yml b/.gitlab-ci.d/checks.yml >> new file mode 100644 >> index 00000000000..f695627b7cd >> --- /dev/null >> +++ b/.gitlab-ci.d/checks.yml >> @@ -0,0 +1,24 @@ >> +check-patch: >> + stage: build >> + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest >> + needs: >> + job: amd64-centos8-container >> + script: .gitlab-ci.d/check-patch.py >> + except: >> + variables: >> + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH >> == 'master' >> + variables: >> + GIT_DEPTH: 1000 >> + allow_failure: true >> + >> +check-dco: >> + stage: build >> + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest >> + needs: >> + job: amd64-centos8-container >> + script: .gitlab-ci.d/check-dco.py >> + except: >> + variables: >> + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH >> == 'master' >> + variables: >> + GIT_DEPTH: 1000 >> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >> index bf4862a78de..ba35b3917e7 100644 >> --- a/.gitlab-ci.yml >> +++ b/.gitlab-ci.yml >> @@ -12,6 +12,7 @@ include: >> - local: '/.gitlab-ci.d/opensbi.yml' >> - local: '/.gitlab-ci.d/containers.yml' >> - local: '/.gitlab-ci.d/crossbuilds.yml' >> + - local: '/.gitlab-ci.d/checks.yml' >> .native_build_job_template: >> stage: build >> > > You added the new file, but it looks like you did not remove the jobs > from the main .gitlab-ci.yml file ? ... that looks like a mistake? > > Also, "checks.yml" sounds a little bit too generic. Maybe rather name > it "style-check.yml" or something similar? Maybe "static_checks.yml". - Wainer > > > Thomas
diff --git a/.gitlab-ci.d/checks.yml b/.gitlab-ci.d/checks.yml new file mode 100644 index 00000000000..f695627b7cd --- /dev/null +++ b/.gitlab-ci.d/checks.yml @@ -0,0 +1,24 @@ +check-patch: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest + needs: + job: amd64-centos8-container + script: .gitlab-ci.d/check-patch.py + except: + variables: + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' + variables: + GIT_DEPTH: 1000 + allow_failure: true + +check-dco: + stage: build + image: $CI_REGISTRY_IMAGE/qemu/centos8:latest + needs: + job: amd64-centos8-container + script: .gitlab-ci.d/check-dco.py + except: + variables: + - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' + variables: + GIT_DEPTH: 1000 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf4862a78de..ba35b3917e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ include: - local: '/.gitlab-ci.d/opensbi.yml' - local: '/.gitlab-ci.d/containers.yml' - local: '/.gitlab-ci.d/crossbuilds.yml' + - local: '/.gitlab-ci.d/checks.yml' .native_build_job_template: stage: build
Extract the DCO / checkpatch jobs to a new file (checks.yml) to be able to run them without having to run all the jobs included in the default .gitlab-ci.yml, which are mainly useful for mainstream CI. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- .gitlab-ci.d/checks.yml | 24 ++++++++++++++++++++++++ .gitlab-ci.yml | 1 + 2 files changed, 25 insertions(+) create mode 100644 .gitlab-ci.d/checks.yml