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

Split CI build into separate develop(unstable)/staging(testing)/release(latest)

parent bb13ebd3
No related branches found
No related tags found
1 merge request!11Optimize CI setup, add libpoppler, and some minor polish
......@@ -13,12 +13,22 @@ builder:stable:
only:
- tags
- master
- staging
script:
- cd containers/builder
- head Dockerfile
- make login
- make release-cached
builder:testing:
stage: builder
tags:
- silicon
only:
- staging
script:
- cd containers/builder
- head Dockerfile
- make login
- make staging-cached
builder:unstable:
stage: builder
tags:
......@@ -43,10 +53,24 @@ config:stable:
only:
- tags
- master
- staging
needs: ["builder:stable"]
script:
- bash containers/release/configure_release.sh
- 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:
paths:
- config/spack-env.sh
......@@ -63,7 +87,7 @@ config:unstable:
- staging
needs: ["builder:unstable"]
script:
- bash containers/release/configure_release.sh
- bash containers/release/configure_release.sh unstable
artifacts:
paths:
- config/spack-env.sh
......@@ -77,7 +101,6 @@ release:stable:
only:
- tags
- master
- staging
needs: ["config:stable"]
script:
- cp config/Dockerfile containers/release/Dockerfile
......@@ -85,6 +108,19 @@ release:stable:
- cd containers/release
- make login
- make release-cached
release:testing:
stage: main
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:
stage: main
tags:
......@@ -106,7 +142,6 @@ builder:singularity:
tags:
- singularity
only:
- staging
- tags
needs: ["builder:stable"]
when: manual
......@@ -127,7 +162,6 @@ release:singularity:
tags:
- singularity
only:
- staging
- tags
needs: ["release:stable"]
script:
......
......@@ -85,8 +85,13 @@ develop: build-nc publish-dev ## Develop build, do not publish latest
@echo "Cleaning up"
#docker rmi $(APP_NAME):latest
staging: build-nc publish-staging ## Develop build, do not publish latest
@echo "Cleaning up"
#docker rmi $(APP_NAME):latest
release-cached: build publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
develop-cached: build login publish-dev ## develop release
staging-cached: build login publish-staging ## develop release
publish: login publish-latest publish-version #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
@echo "Publishing done"
......@@ -98,6 +103,11 @@ publish-latest: ## Publish the `latest` taged container to ECR
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
#docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
publish-staging: ## Publish the `unstable` taged container to ECR
@echo 'publish unstable to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):testing
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):testing
publish-dev: ## Publish the `unstable` taged container to ECR
@echo 'publish unstable to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable
......
# Release container for Argonne EIC software
# Copy over relevant files from builder
#
FROM eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest as builder
FROM eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:@TAG@ as builder
RUN cd /opt/spack-environment && spack env activate . && spack gc -y
# Strip all the binaries
......
......@@ -9,6 +9,8 @@ mkdir -p config
cp /etc/profile.d/z10_spack_environment.sh config/spack-env.sh
export TAG=$1
## Spack sets the man-path, which stops bash from using the default man-path
## We can fix this by appending a trailing colon to MANPATH
sed -i '/MANPATH/ s/;$/:;/' config/spack-env.sh
......@@ -20,4 +22,5 @@ grep export config/spack-env.sh | \
## create our release Dockerfile
sed '/^@ENV@/r config/eic-env.sh' containers/release/Dockerfile.in | \
sed '/^@ENV@/d' > config/Dockerfile
sed '/^@ENV@/d' | \
sed "s/@TAG@/$TAG/" > config/Dockerfile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment