Skip to content
Snippets Groups Projects
Commit 2d1cca11 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Streamlining gitlab CI, removed testing/staging step from workflow and added...

Streamlining gitlab CI, removed testing/staging step from workflow and added CI rules for merge requests
parent 6dd011cf
No related branches found
No related tags found
1 merge request!16New feature version
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
#
stages: stages:
- builder - builder
- config - config
...@@ -9,68 +9,41 @@ stages: ...@@ -9,68 +9,41 @@ stages:
builder:stable: builder:stable:
stage: builder stage: builder
tags: tags:
- silicon - silicon
only:
- tags
- master
script:
- cd containers/builder
- head Dockerfile
- make login
- make release-cached
builder:testing:
stage: builder
tags:
- silicon
only: only:
- staging - tags
- master
script: script:
- cd containers/builder - cd containers/builder
- head Dockerfile - head Dockerfile
- make login - make login
- make staging-cached - make release-cached
builder:unstable: builder:unstable:
stage: builder stage: builder
tags: tags:
- silicon - silicon
except: rules:
- tags - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != develop'
- master when: always
- staging - if: '$CI_COMMIT_BRANCH == "develop"'
when: always
script: script:
- cd containers/builder - cd containers/builder
- head Dockerfile - head Dockerfile
- make login - make login
- make develop-cached - make develop-cached
## I wish there were a simple way to transfer the "latest/unstable" strings
## between jobs...
config:stable: config:stable:
image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest
stage: config stage: config
tags: tags:
- silicon - silicon
only: only:
- tags - tags
- master - master
needs: ["builder:stable"] needs: ["builder:stable"]
script: script:
- bash containers/release/configure_release.sh latest - bash containers/release/configure_release.sh latest
artifacts:
paths:
- config/spack-env.sh
- config/eic-env.sh
- config/Dockerfile
config:testing:
image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:testing
stage: config
tags:
- silicon
only:
- staging
needs: ["builder:testing"]
script:
- bash containers/release/configure_release.sh testing
artifacts: artifacts:
paths: paths:
- config/spack-env.sh - config/spack-env.sh
...@@ -81,10 +54,11 @@ config:unstable: ...@@ -81,10 +54,11 @@ config:unstable:
stage: config stage: config
tags: tags:
- silicon - silicon
except: rules:
- tags - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != develop'
- master when: manual
- staging - if: '$CI_COMMIT_BRANCH == "develop"'
when: always
needs: ["builder:unstable"] needs: ["builder:unstable"]
script: script:
- bash containers/release/configure_release.sh unstable - bash containers/release/configure_release.sh unstable
...@@ -108,27 +82,15 @@ release:stable: ...@@ -108,27 +82,15 @@ release:stable:
- cd containers/release - cd containers/release
- make login - make login
- make release-cached - make release-cached
release:testing:
stage: slim
tags:
- silicon
only:
- staging
needs: ["config:testing"]
script:
- cp config/Dockerfile containers/release/Dockerfile
- cp config/eic-env.sh containers/release/eic-env.sh
- cd containers/release
- make login
- make staging-cached
release:unstable: release:unstable:
stage: slim stage: slim
tags: tags:
- silicon - silicon
except: rules:
- tags - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != develop'
- master when: manual
- staging - if: '$CI_COMMIT_BRANCH == "develop"'
when: always
needs: ["config:unstable"] needs: ["config:unstable"]
script: script:
- cp config/Dockerfile containers/release/Dockerfile - cp config/Dockerfile containers/release/Dockerfile
...@@ -141,6 +103,11 @@ release:singularity: ...@@ -141,6 +103,11 @@ release:singularity:
stage: singularity stage: singularity
tags: tags:
- silicon - silicon
rules:
- if: '$CI_COMMIT_TAG'
when: always
- if: '$CI_COMMIT_BRANCH == "master"'
when: manual
only: only:
- tags - tags
needs: ["release:stable"] needs: ["release:stable"]
...@@ -152,47 +119,7 @@ release:singularity: ...@@ -152,47 +119,7 @@ release:singularity:
- cp eic.sif build/. - cp eic.sif build/.
- cp eic.def build/. - cp eic.def build/.
artifacts: artifacts:
expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in expire_in: 90 days
paths:
- build/eic.sif
- build/eic.def
release:singularity:stable:
stage: singularity
tags:
- silicon
only:
- master
when: manual
needs: ["release:stable"]
script:
- cp containers/release/eic.def .
- /bin/bash .gitlabci/setup.sh
- /bin/bash .gitlabci/build.sh eic.def
- mkdir -p build
- cp eic.sif build/.
- cp eic.def build/.
artifacts:
expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in
paths:
- build/eic.sif
- build/eic.def
release:singularity:testing:
stage: singularity
tags:
- silicon
only:
- staging
when: manual
needs: ["release:testing"]
script:
- cp containers/release/eic.def .
- /bin/bash .gitlabci/setup.sh
- /bin/bash .gitlabci/build.sh eic.def
- mkdir -p build
- cp eic.sif build/.
- cp eic.def build/.
artifacts:
expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in
paths: paths:
- build/eic.sif - build/eic.sif
- build/eic.def - build/eic.def
...@@ -203,7 +130,11 @@ release:singularity:unstable: ...@@ -203,7 +130,11 @@ release:singularity:unstable:
only: only:
- develop - develop
needs: ["release:unstable"] needs: ["release:unstable"]
when: manual rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != develop'
when: manual
- if: '$CI_COMMIT_BRANCH == "develop"'
when: manual
script: script:
- cp containers/release/eic.def . - cp containers/release/eic.def .
- /bin/bash .gitlabci/setup.sh - /bin/bash .gitlabci/setup.sh
...@@ -212,7 +143,7 @@ release:singularity:unstable: ...@@ -212,7 +143,7 @@ release:singularity:unstable:
- cp eic.sif build/. - cp eic.sif build/.
- cp eic.def build/. - cp eic.def build/.
artifacts: artifacts:
expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in expire_in: 90 days
paths: paths:
- build/eic.sif - build/eic.sif
- build/eic.def - build/eic.def
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment