diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5175a1a97ad8aeef1e8a304407302cbed17d049f..c28bed6c46b97908cdc5c908b31205b5e10df90f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,156 +1,54 @@ image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest stages: - - builder - config - - slim - - singularity + - trigger -## We use minimal file artifacts to transport variables between job -## stages, such as the branch we are working on and the need for -## caching. -## By evaluating these files in the before_script, we can set -## relevant environment variables before our pipelines run +## make note if we cannot use caching for one of the stages +## by touching files in .ci_env default: + tags: + - silicon artifacts: paths: - .ci-env - before_script: - - mkdir -p .ci-env - - | - if [ -f .ci-env/release ]; then - export BRANCH='release' - elif [ -f .ci-env/develop ]; then - export BRANCH='develop' - else export BRANCH='UNKNOWN' - fi - - | - if [ -f .ci-env/builder-nc ]; then - export BUILDER_TARGET="${BRANCH}" - else - export BUILDER_TARGET="${BRANCH}-cached" - fi - - | - if [ -f .ci-env/release-nc ]; then - export RELEASE_TARGET="${BRANCH}" - else - export RELEASE_TARGET="${BRANCH}-cached" - fi - tags: - - silicon - -## Stable or unstable branch? -init:stable: - stage: .pre - rules: - - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH == "master"' - when: always - script: - - touch .ci-env/release -init:unstable: - stage: .pre - rules: - - if: '$CI_COMMIT_TAG == null && $CI_COMMIT_BRANCH != "master"' - when: always - script: - - touch .ci-env/develop -init:builder-nc: +detect_changes:builder: stage: .pre rules: - changes: + - gitlab-ci/docker/* - containers/builder/Dockerfile - containers/builder/spack.yaml - spack/packages/**/* script: + - mkdir -p .ci-env - touch .ci-env/builder-nc -init:release-nc: +detect_changes:release: stage: .pre rules: - changes: + - gitlab-ci/docker/* + - gitlab-ci/singularity/* - containers/release/Dockerfile.in - containers/release/configure_release.sh script: + - mkdir -p .ci-env - touch .ci-env/release-nc -builder: - stage: builder - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - when: on_success - - if: '$CI_COMMIT_BRANCH == "develop"' - when: on_success - - if: '$CI_COMMIT_TAG' - when: on_success - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != "develop"' - when: on_success - script: - - cp -r spack containers/builder/np-spack - - cd containers/builder - - head Dockerfile - - make login - - echo "Creating builder image for ${BUILDER_TARGET}" - - make ${BUILDER_TARGET} - -.config: +## Init our job for our desired branches/tags/events +init: stage: config script: - - bash containers/release/configure_release.sh ${BRANCH} + - ./gitlab-ci/configure_pipeline.sh gitlab-ci/build_and_deploy.yml.in artifacts: paths: - - config -config:stable: - extends: .config - image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest - only: - - tags - - master -config:unstable: - extends: .config - image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:unstable - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != "develop"' - when: manual - - if: '$CI_COMMIT_BRANCH == "develop"' - when: on_success - -release: - stage: slim - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - when: on_success - - if: '$CI_COMMIT_BRANCH == "develop"' - when: on_success - - if: '$CI_COMMIT_TAG' - when: on_success - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != "develop"' - when: manual - script: - - cp config/Dockerfile containers/release/Dockerfile - - cp config/eic-env.sh containers/release/eic-env.sh - - cd containers/release - - make login - - make ${RELEASE_TARGET} + - build_and_deploy.yml -release:singularity: - stage: singularity - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - when: manual - - if: '$CI_COMMIT_BRANCH == "develop"' - when: manual - - if: '$CI_COMMIT_TAG' - when: on_success - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_BRANCH != "develop"' - when: manual - script: - - cp config/eic.def 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 - paths: - - build/eic.sif - - build/eic.def +## Dispatch if we ran the previous stage +run:default: + stage: trigger + trigger: + include: + - artifact: build_and_deploy.yml + job: init + strategy: depend diff --git a/.gitlabci/setup.sh b/.gitlabci/setup.sh deleted file mode 100644 index 195b153ec17ef5589c1e0bb0f64add67e243d9f2..0000000000000000000000000000000000000000 --- a/.gitlabci/setup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -#apt-get update && apt-get install -y wget git \ -# build-essential \ -# squashfs-tools \ -# libtool \ -# autotools-dev \ -# libarchive-dev \ -# automake \ -# autoconf \ -# uuid-dev \ -# libssl-dev \ -# python-pip -# -# -### Somehow sed cant find /etc/sudoers -##sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers -# -## Check Python -# -#echo "Python Version:" -#python --version -#pip install sregistry[all] -#sregistry version -# -#echo "sregistry Version:" -# -## Install Singularity -# -#cd /tmp && \ -# rm -rf singularity && \ -# git clone -b vault/release-2.5 https://www.github.com/sylabs/singularity.git -# cd singularity && \ -# ./autogen.sh && \ -# ./configure --prefix=/usr/local && \ -# make -j8 && make install diff --git a/.gitlabci/sregistry-gitlab.png b/.gitlabci/sregistry-gitlab.png deleted file mode 100644 index a14e917a20fb32011329af6bc6abd04012acd0d6..0000000000000000000000000000000000000000 Binary files a/.gitlabci/sregistry-gitlab.png and /dev/null differ diff --git a/.gitlabci/sregistry-gitlab.xcf b/.gitlabci/sregistry-gitlab.xcf deleted file mode 100644 index f2742162bfc602f92d3d9c5cd573f29e334e042d..0000000000000000000000000000000000000000 Binary files a/.gitlabci/sregistry-gitlab.xcf and /dev/null differ diff --git a/README.md b/README.md index 9a3f56224f3f264510c54b74483d5393af82a80c..17b1a11a136e9c85012a75d5bae0532c483ed849 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,14 @@ git clone https://eicweb.phy.anl.gov/containers/eic_container.git cd eic_container ``` -2. Run the deploy script `deploy.py` to install to your `<PREFIX>` of choice +2. Run the install script `install.py` to install to your `<PREFIX>` of choice (e.g. $HOME/local/opt/eic_container_1.0.4). By default the modeuefile will be installed to `$PREFIX/../../etc/modulefiles`. - You can use the `-v` flag to select the version you want to deploy, or omit the + You can use the `-v` flag to select the version you want to install, or omit the flag if you want to install the master build. The recommended stable release version is `v2.5.0`. ```bash -./deploy.py -v 2.5.0 <PREFIX> +./install.py -v 2.5.0 <PREFIX> ``` Available flags: @@ -29,7 +29,7 @@ cd eic_container -m MODULE_PATH, --module-path MODULE_PATH (opt.) Root module path where you want to install a modulefile. D: <prefix>/../../etc/modulefiles - -l, --local Local deploy, will not install the modulefiles (you will have + -l, --local Local install, will not install the modulefiles (you will have to run the launcher scripts from their relative paths). -f, --force Force-overwrite already downloaded container with the same name. ``` @@ -41,16 +41,16 @@ cd eic_container module load eic_container ``` -4. To use the container in local mode, you can deploy the container with the `-l` flag, +4. To use the container in local mode, you can install the container with the `-l` flag, and then use the runscripts (under `$PREFIX/bin`) manually. ```bash -./deploy.py $PREFIX -l +./install.py $PREFIX -l ... $PREFIX/bin/eic-shell ``` 4. (Advanced) If you need to add additional bind directives for the internal singularity container, - you can add them with the `-b` flag. Run `./deploy.py -h` to see a list of all + you can add them with the `-b` flag. Run `./install.py -h` to see a list of all supported options. Usage @@ -75,9 +75,9 @@ eic-shell ### B. Running the singularity development locally (without modulefiles) -1. This is assuming you deployed with the `-l` flag to a prefix `$PREFIX`: +1. This is assuming you installed with the `-l` flag to a prefix `$PREFIX`: ```bash -./deploy.py $PREFIX +./install.py $PREFIX ``` 2. To start a shell in the container environment, do @@ -109,7 +109,7 @@ Included software: - heppdt@3.04.01 - clhep@2.4.1.3 - eigen@3.3.8 - - python@3.8.6 with pip, numpy, pyyaml, pyafp, matplotlib, ipython, scipy + - python@3.7.8 with pip, numpy, pyyaml, pyafp, matplotlib, ipython, scipy - xrootd@4.12.3 - root@6.22.00 - pythia8@8303 @@ -118,8 +118,8 @@ Included software: - podio@master - geant4@10.6.2 - dd4hep@1.14.1 - - acts@3.00.0 - - gaudi@35.0 + - acts@1.00.0 + - gaudi@34.0 - dawn@3.91a - dawncut@1.54a - The singularity build exports the following applications: diff --git a/containers/builder/Makefile b/containers/builder/Makefile deleted file mode 100644 index 208ea6f2e9a6f9c0da700464e5be8df10c3e8573..0000000000000000000000000000000000000000 --- a/containers/builder/Makefile +++ /dev/null @@ -1,224 +0,0 @@ -# import config. -# You can change the default config with `make cnf="config_special.env" build` -cnf ?= config.env -include $(cnf) -# exports variables in config.env as environment variables -export $(shell sed 's/=.*//' $(cnf)) - - -# import deploy config -# You can change the default deploy config with `make cnf="deploy_special.env" release` - -SHELL = bash -# grep the version from the mix file -VERSION=$(shell bash version.sh) - - -# help will output the help for each task -# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html -.PHONY: help - -help: ## This help. - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.DEFAULT_GOAL := help - -# ========================================================================== -# -build: ## build the image - docker build -t $(APP_NAME) . - -build-nc: ## Build the container without caching (from scratch) - docker build --no-cache -t $(APP_NAME) . - -build-alt: ## build the container for various machine architectures (broadwell, haswell, knl) - @echo 'building for architecture: $(ALT_NAME)' - docker build -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) . - -build-alt-nc: ## build the container for various machine architectures (broadwell, haswell, knl) - @echo 'build-alt-nc: building for architecture: $(ALT_NAME)' - docker build --no-cache -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) . - -# ========================================================================== -# -run: ## Run container on port configured in `config.env` - docker run -i -t --rm --env-file=./config.env -p=$(PORT):$(PORT) --name="$(APP_NAME)" $(REPO)/$(APP_NAME):$(TAG_VERSION) - -up: build run ## Run container on port configured in `config.env` (Alias to run) - -stop: ## Stop and remove a running container - docker stop $(APP_NAME); docker rm $(APP_NAME) - -# ========================================================================== -# -tag: tag-latest tag-version #tag-version ## Generate container tags for the `{version}` and `latest` tags - -tag-latest: ## Generate container `{version}` tag - @echo 'create tag latest' - #docker tag $(APP_NAME) $(REPO)/$(APP_NAME):latest - -tag-version: ## Generate container `latest` tag - @echo 'creating tag $(APP_NAME):$(VERSION)' - docker tag $(APP_NAME):latest $(APP_NAME):$(VERSION) - -tag-alt: tag-alt-latest # tag-alt-version ## Generate container tags for the `{version}` ans `latest` tags - -tag-alt-latest: ## Generate container `{version}` tag - @echo 'create tag latest' - #docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):latest - -tag-alt-version: ## Generate container `{version}` tag - @echo 'create tag latest' - docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - -# ========================================================================== -# -login: ## Auto login to AWS-ECR unsing aws-cli - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} - echo "Login COMPLETE" - -release: build-nc publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR - @echo "Cleaning up" - docker rmi $(APP_NAME):latest - -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" - - -publish-latest: ## Publish the `latest` taged container to ECR - @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - 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 - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable - -publish-version: tag-version ## Publish the `{version}` taged container to ECR - @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - #docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - -push: login ## push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - -# ========================================================================== -# -release-alt: build-alt publish-alt ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR - -publish-alt: login publish-alt-latest #publish-alt-version ## Publish the `{version}` ans `latest` tagged containers to ECR - -push-alt: login tag-alt-latest ## push after login - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - -publish-alt-latest: #tag-alt-latest ## Publish the `latest` taged container to ECR - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest - docker tag $(APP_NAME)_$(ALT_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - -publish-alt-version: tag-alt-version ## Publish the `latest` taged container to ECR - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - -# ========================================================================== -# - -login-dockerhub: ## login to hub.docker.com - @echo 'docker hub login :' - docker login - -push-dockerhub: build #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR - @echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)' - docker push $(DH_ORG)/$(APP_NAME):latest - #docker push $(DH_ORG)/$(APP_NAME):$(VERSION) - -publish-dockerhub: build tag #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR - @echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)' - docker push $(DH_ORG)/$(APP_NAME):latest - #docker push $(DH_ORG)/$(APP_NAME):$(VERSION) - -# ========================================================================== -# -clean-tags: - docker rmi $(REPO)/$(APP_NAME):latest || true - docker rmi $(GL_GROUP)/$(APP_NAME):latest || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - -clean: - docker rmi $(REPO_NAME)/$(APP_NAME) || true - docker rmi $(REPO_NAME)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REPO_NAME)/$(APP_NAME):$(VERSION) || true - docker rmi $(REPO)/$(APP_NAME) || true - docker rmi $(REPO)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REPO)/$(APP_NAME):$(VERSION) || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME) || true - docker rmi $(DH_ORG)/$(APP_NAME) || true - docker rmi $(DH_ORG)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(DH_ORG)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME) || true - docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME):$(VERSION) || true - #docker rmi $(APP_NAME) || true - -version: ## Output the current version - @echo $(VERSION) - -# ========================================================================== -# -info: ## Output the current version - @echo 'VERSION = $(VERSION) ' - @echo 'REG_USER = $(REG_USER) ' - @echo 'REG_NAME = $(REG_NAME) ' - @echo 'ALT_NAME = $(ALT_NAME) ' - @echo 'APP_NAME = $(APP_NAME) ' - @echo 'REPO_NAME = $(REPO_NAME) ' - @echo 'DH_ORG = $(DH_ORG) ' - @echo 'GL_GROUP = $(GL_GROUP) ' - @echo 'GL_REG_GROUP = $(GL_REG_GROUP)' - @echo 'GL_REG_NAME = $(GL_REG_NAME) ' - @echo 'REPO = $(REPO) ' - @echo 'TAG_VERSION = $(TAG_VERSION) ' - -ls: ## list all docker images - docker images diff --git a/containers/builder/config.env b/containers/builder/config.env index 29f4d798964e7eedc430ea94b22a27ce5e1ec9d5..fea4ef6c4b32691a1c65f385e032603ab0d1ead6 100644 --- a/containers/builder/config.env +++ b/containers/builder/config.env @@ -1,22 +1,11 @@ -REG_TOKEN ?= ${CI_IMAGE_BUILD_PAT} -REG_USER ?= whit REG_HOST ?= eicweb.phy.anl.gov -REG_NAME ?= eicweb.phy.anl.gov:4567 REG_PORT ?= 4567 +REG_NAME ?= $(REG_HOST):$(REG_PORT) REG_URL ?= https://$(REG_HOST) -# name of alternate build: -# Dockerfile.$(ALT_NAME) --> $(APP_NAME)_${ALT_NAME} -ALT_NAME ?= broadwell - APP_NAME = eic_builder REPO_NAME = eic_builder -DH_ORG = eic - GL_GROUP = eic_container GL_REG_GROUP = containers/eic_container GL_REG_NAME = $(REG_NAME) - -REPO = $(REG_USER) -TAG_VERSION = latest diff --git a/containers/builder/eic_builder.def b/containers/builder/eic_builder.def deleted file mode 100644 index d2ba0e8847ad30e8c50f244994d98f98eba580cd..0000000000000000000000000000000000000000 --- a/containers/builder/eic_builder.def +++ /dev/null @@ -1,19 +0,0 @@ -Bootstrap: docker -From: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest - -%help - EIC software container. - Tools: - Tools: - - eic_shell : Bash shell in this container - - root : Root shell in the container - - ipython : Python shell in the container - -%labels - Maintainer "Whitney Armstrong, Sylvester Joosten" - Version v2.0 - -%post -c /bin/bash - echo " -------------------------------------------------" - echo " ===> Image setup complete" - echo " -------------------------------------------------" diff --git a/containers/builder/spack.yaml b/containers/builder/spack.yaml index 80d99fdd42f27ad1e381a9e3d2b4228a5aa282be..20b0061065561017e0ee8098040af9467fcf6a03 100644 --- a/containers/builder/spack.yaml +++ b/containers/builder/spack.yaml @@ -7,7 +7,7 @@ spack: - heppdt@3.04.01 - clhep@2.4.1.3 cxxstd=17 - eigen@3.3.8 - - python@3.8.6 + - python@3.7.8 - py-pip - py-numpy - py-pyyaml @@ -23,8 +23,8 @@ spack: - podio@master - geant4@10.6.2 cxxstd=17 +opengl +vecgeom +x11 +qt ^qt +opengl - dd4hep@1.14.1 +geant4 +assimp +hepmc3 +ipo - - acts@3.00.0 +dd4hep +digitization +identification +json +tgeo +ipo - - gaudi@35.0 + - acts@1.02.0 +dd4hep +digitization +identification +json +tgeo +ipo + - gaudi@34.0 - dawn@3_91a - dawncut@1_54a concretization: together diff --git a/containers/builder/version.sh b/containers/builder/version.sh deleted file mode 100644 index 279e0acd2a1b6dcd6bd0c7132ec7af650a504541..0000000000000000000000000000000000000000 --- a/containers/builder/version.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -head -n1 ../../VERSION diff --git a/containers/release/Makefile b/containers/release/Makefile deleted file mode 100644 index 307466d05a0bd4fd2222854816cb217cf35095d2..0000000000000000000000000000000000000000 --- a/containers/release/Makefile +++ /dev/null @@ -1,224 +0,0 @@ -# import config. -# You can change the default config with `make cnf="config_special.env" build` -cnf ?= config.env -include $(cnf) -# exports variables in config.env as environment variables -export $(shell sed 's/=.*//' $(cnf)) - - -# import deploy config -# You can change the default deploy config with `make cnf="deploy_special.env" release` - -SHELL = bash -# grep the version from the mix file -VERSION=$(shell bash version.sh) - - -# help will output the help for each task -# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html -.PHONY: help - -help: ## This help. - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) - -.DEFAULT_GOAL := help - -# ========================================================================== -# -build: ## build the image - docker build -t $(APP_NAME) . - -build-nc: ## Build the container without caching (from scratch) - docker build --no-cache -t $(APP_NAME) . - -build-alt: ## build the container for various machine architectures (broadwell, haswell, knl) - @echo 'building for architecture: $(ALT_NAME)' - docker build -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) . - -build-alt-nc: ## build the container for various machine architectures (broadwell, haswell, knl) - @echo 'build-alt-nc: building for architecture: $(ALT_NAME)' - docker build --no-cache -t $(APP_NAME)_$(ALT_NAME) -f Dockerfile.$(ALT_NAME) . - -# ========================================================================== -# -run: ## Run container on port configured in `config.env` - docker run -i -t --rm --env-file=./config.env -p=$(PORT):$(PORT) --name="$(APP_NAME)" $(REPO)/$(APP_NAME):$(TAG_VERSION) - -up: build run ## Run container on port configured in `config.env` (Alias to run) - -stop: ## Stop and remove a running container - docker stop $(APP_NAME); docker rm $(APP_NAME) - -# ========================================================================== -# -tag: tag-latest tag-version #tag-version ## Generate container tags for the `{version}` and `latest` tags - -tag-latest: ## Generate container `{version}` tag - @echo 'create tag latest' - #docker tag $(APP_NAME) $(REPO)/$(APP_NAME):latest - -tag-version: ## Generate container `latest` tag - @echo 'creating tag $(APP_NAME):$(VERSION)' - docker tag $(APP_NAME):latest $(APP_NAME):$(VERSION) - -tag-alt: tag-alt-latest # tag-alt-version ## Generate container tags for the `{version}` ans `latest` tags - -tag-alt-latest: ## Generate container `{version}` tag - @echo 'create tag latest' - #docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):latest - -tag-alt-version: ## Generate container `{version}` tag - @echo 'create tag latest' - docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - -# ========================================================================== -# -login: ## Auto login to AWS-ECR unsing aws-cli - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} - echo "Login COMPLETE" - -release: build-nc publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR - @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 - -develop: build-nc publish-dev ## 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 -staging-cached: build login publish-staging ## staging release -develop-cached: build login publish-dev ## develop release - -publish: login publish-latest publish-version #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR - @echo "Publishing done" - - -publish-latest: ## Publish the `latest` taged container to ECR - @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - 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 - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable - -publish-version: tag-version ## Publish the `{version}` taged container to ECR - @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - #docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) - -push: login ## push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest' - docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest - -# ========================================================================== -# -release-alt: build-alt publish-alt ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR - -publish-alt: login publish-alt-latest #publish-alt-version ## Publish the `{version}` ans `latest` tagged containers to ECR - -push-alt: login tag-alt-latest ## push after login - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - -publish-alt-latest: #tag-alt-latest ## Publish the `latest` taged container to ECR - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest - docker tag $(APP_NAME)_$(ALT_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest - -publish-alt-version: tag-alt-version ## Publish the `latest` taged container to ECR - #docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) - -# ========================================================================== -# - -login-dockerhub: ## login to hub.docker.com - @echo 'docker hub login :' - docker login - -push-dockerhub: build #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR - @echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)' - docker push $(DH_ORG)/$(APP_NAME):latest - #docker push $(DH_ORG)/$(APP_NAME):$(VERSION) - -publish-dockerhub: build tag #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR - @echo '$(DH_ORG)/$(APP_NAME):$(TAG_VERSION)' - docker push $(DH_ORG)/$(APP_NAME):latest - #docker push $(DH_ORG)/$(APP_NAME):$(VERSION) - -# ========================================================================== -# -clean-tags: - docker rmi $(REPO)/$(APP_NAME):latest || true - docker rmi $(GL_GROUP)/$(APP_NAME):latest || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - -clean: - docker rmi $(REPO_NAME)/$(APP_NAME) || true - docker rmi $(REPO_NAME)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REPO_NAME)/$(APP_NAME):$(VERSION) || true - docker rmi $(REPO)/$(APP_NAME) || true - docker rmi $(REPO)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REPO)/$(APP_NAME):$(VERSION) || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME) || true - docker rmi $(DH_ORG)/$(APP_NAME) || true - docker rmi $(DH_ORG)/$(APP_NAME):$(TAG_VERSION) || true - docker rmi $(DH_ORG)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true - docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true - docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME) || true - docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME):$(VERSION) || true - #docker rmi $(APP_NAME) || true - -version: ## Output the current version - @echo $(VERSION) - -# ========================================================================== -# -info: ## Output the current version - @echo 'VERSION = $(VERSION) ' - @echo 'REG_USER = $(REG_USER) ' - @echo 'REG_NAME = $(REG_NAME) ' - @echo 'ALT_NAME = $(ALT_NAME) ' - @echo 'APP_NAME = $(APP_NAME) ' - @echo 'REPO_NAME = $(REPO_NAME) ' - @echo 'DH_ORG = $(DH_ORG) ' - @echo 'GL_GROUP = $(GL_GROUP) ' - @echo 'GL_REG_GROUP = $(GL_REG_GROUP)' - @echo 'GL_REG_NAME = $(GL_REG_NAME) ' - @echo 'REPO = $(REPO) ' - @echo 'TAG_VERSION = $(TAG_VERSION) ' - -ls: ## list all docker images - docker images diff --git a/containers/release/config.env b/containers/release/config.env index da3c4f905c37876319551989888a6e065a482cd6..3249f5afb6e385cc693a02673a8964a7f6c7b1fb 100644 --- a/containers/release/config.env +++ b/containers/release/config.env @@ -1,22 +1,11 @@ -REG_TOKEN ?= ${CI_IMAGE_BUILD_PAT} -REG_USER ?= whit REG_HOST ?= eicweb.phy.anl.gov -REG_NAME ?= eicweb.phy.anl.gov:4567 REG_PORT ?= 4567 +REG_NAME ?= $(REG_HOST):$(REG_PORT) REG_URL ?= https://$(REG_HOST) -# name of alternate build: -# Dockerfile.$(ALT_NAME) --> $(APP_NAME)_${ALT_NAME} -ALT_NAME ?= broadwell - APP_NAME = eic REPO_NAME = eic -DH_ORG = eic - GL_GROUP = eic_container GL_REG_GROUP = containers/eic_container GL_REG_NAME = $(REG_NAME) - -REPO = $(REG_USER) -TAG_VERSION = latest diff --git a/containers/release/version.sh b/containers/release/version.sh deleted file mode 100644 index 279e0acd2a1b6dcd6bd0c7132ec7af650a504541..0000000000000000000000000000000000000000 --- a/containers/release/version.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -head -n1 ../../VERSION diff --git a/gitlab-ci/build_and_deploy.yml.in b/gitlab-ci/build_and_deploy.yml.in new file mode 100644 index 0000000000000000000000000000000000000000..135b2e38fc66f389a28a01c7bb5637648eebe54c --- /dev/null +++ b/gitlab-ci/build_and_deploy.yml.in @@ -0,0 +1,83 @@ +image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest + +stages: + - build + - config + - package + - singularity + +## variables: +## - TARGET_XXX: docker build target (including cache modifier) +## (stable, stable-cached, unstable, unstable-cached) +## - TAG: main docker tag to be used internally +## (e.g. 2.5-stable/unstable/<version>) +## - PUBLISH: docker publish directives +variables: + TARGET_BUILDER: @TARGET_BUILDER@ + TARGET_RELEASE: @TARGET_RELEASE@ + TAG: @TAG@ + PUBLISH: "@PUBLISH@" + +default: + tags: + - silicon + +builder: + stage: build + script: + - cp -r gitlab-ci/docker/* containers/builder + - cp -r spack containers/builder/np-spack + - cd containers/builder + - head Dockerfile + - make login + - echo "Creating builder image for $TARGET_BUILDER" + - make $TARGET_BUILDER + - echo "Publishing image $PUBLISH" + - make $PUBLISH + +config: + image: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:$TAG + stage: config + needs: ["builder"] + script: + - bash containers/release/configure_release.sh $TAG + artifacts: + paths: + - config + +release:docker: + stage: package + needs: ["config"] + script: + - cp -r gitlab-ci/docker/* containers/release + - cp config/Dockerfile containers/release/Dockerfile + - cp config/eic-env.sh containers/release/eic-env.sh + - cd containers/release + - make login + - echo "Creating release image for $TARGET_RELEASE" + - make $TARGET_RELEASE + - echo "Publishing image $PUBLISH" + - make $PUBLISH + +release:singularity: + stage: singularity + needs: ["release:docker"] + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - if: '$CI_COMMIT_BRANCH == "v$TAG"' + when: on_success + - if: '$CI_COMMIT_TAG == "v$TAG"' + when: on_success + script: + - cp config/eic.def 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 + paths: + - build/eic.sif + - build/eic.def diff --git a/gitlab-ci/configure_pipeline.sh b/gitlab-ci/configure_pipeline.sh new file mode 100755 index 0000000000000000000000000000000000000000..196794895cbe8e0c6d62dbabd23b006ae7d8310a --- /dev/null +++ b/gitlab-ci/configure_pipeline.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +## Configure a CI pipeline based on a template file (first and only +## argument to this script). +TEMPLATE_FILE=$1 +OUTPUT_FILE=`basename ${TEMPLATE_FILE} .in` + +echo "Configuring pipeline script: ${TEMPLATE_FILE}" +echo "Output will be written to: ${OUTPUT_FILE}" + +VERSION=`head -n1 VERSION` +STABLE="${VERSION%.*}-stable" + +## Figure out which scenario we are running: +## - master +## - stable +## - tag +## - unstable (default) +TARGET="" +TAG="" +PUBLISH="" +if [ "$CI_COMMIT_BRANCH" = "master" ]; then + TARGET="stable" + TAG="latest" + PUBLISH="publish-latest publish-stable" +elif [ "$CI_COMMIT_TAG" = "v${VERSION}" ]; then + TARGET=$VERSION + TAG=$VERSION + PUBLISH="publish-version" +elif [ "$CI_COMMIT_BRANCH" = "v${STABLE}" ]; then + TARGET="stable" + TAG=${STABLE} + PUBLISH="publish-stable" +else + TARGET="unstable" + TAG="unstable" + PUBLISH="publish-unstable" +fi + +TARGET_BUILDER=$TARGET +TARGET_RELEASE=$TARGET + +if [ ! -f .ci_env/buider-nc ]; then + TARGET_BUILDER="${TARGET_BUILDER}-cached" +fi +if [ ! -f .ci_env/release-nc ]; then + TARGET_BUILDER="${TARGET_RELEASE}-cached" +fi + +sed "s/@TAG@/$TAG/g" $TEMPLATE_FILE | \ + sed "s/@TARGET_BUILDER@/$TARGET_BUILDER/g" | \ + sed "s/@TARGET_RELEASE@/$TARGET_RELEASE/g" | \ + sed "s/@PUBLISH@/$PUBLISH/g" > ${OUTPUT_FILE} + +echo "Done" diff --git a/gitlab-ci/docker/Makefile b/gitlab-ci/docker/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..4f05c8d3704e4a658d09aa6887325c233e3ad281 --- /dev/null +++ b/gitlab-ci/docker/Makefile @@ -0,0 +1,86 @@ +# import config. +# You can change the default config with `make cnf="config_special.env" build` +cnf ?= config.env +include $(cnf) +# exports variables in config.env as environment variables +export $(shell sed 's/=.*//' $(cnf)) + + +# import deploy config +# You can change the default deploy config with `make cnf="deploy_special.env" release` + +SHELL = bash + +## Get our version tag and stable version tag +VERSION=$(shell head -n1 ../../VERSION) +STABLE=$(shell echo ${$(head -n1 ../../VERSION)%.*}-stable) + +# help will output the help for each task +# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +.PHONY: help + +help: ## This help. + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help + +# ========================================================================== +# +build: ## build the image + docker build -t $(APP_NAME):$(VERSION) . +build-unstable: ## build the image + docker build -t $(APP_NAME):$(VERSION)-unstable . + +build-nc: ## Build the container without caching (from scratch) + docker build --no-cache -t $(APP_NAME):$(VERSION) . +build-unstable-nc: ## Build the container without caching (from scratch) + docker build --no-cache -t $(APP_NAME):$(VERSION)-unstable . + +# ========================================================================== +# +login: ## Auto login to AWS-ECR unsing aws-cli + docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}/${CI_PROJECT_PATH} + echo "Login COMPLETE" + +stable: build-nc +stable-cached: build +unstable: build-unstable-nc +unstable-cached: build-unstable + +publish: login publish-latest publish-version #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR + @echo "Publishing done" + + +publish-stable: login + @echo 'publish $(STABLE) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' + docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(STABLE) + docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(STABLE) + +publish-latest: login + @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' + docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest + docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest + +publish-version: login + @echo 'publish $(STABLE) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' + docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) + docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) + +publish-unstable: login + @echo 'publish unstable to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' + docker tag $(APP_NAME):$(VERSION)-unstable $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable + docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable + +version: ## Output the current version + @echo $(VERSION) + +# ========================================================================== +# +info: ## Output the current version + @echo 'VERSION = $(VERSION) ' + @echo 'STABLE = $(STABLE) ' + @echo 'REG_NAME = $(REG_NAME) ' + @echo 'APP_NAME = $(APP_NAME) ' + @echo 'GL_GROUP = $(GL_GROUP) ' + @echo 'GL_REG_GROUP = $(GL_REG_GROUP)' + @echo 'GL_REG_NAME = $(GL_REG_NAME) ' diff --git a/gitlab-ci/docker/version-stable.sh b/gitlab-ci/docker/version-stable.sh new file mode 100644 index 0000000000000000000000000000000000000000..106797da2c4a570ad5a231e6f7b4f56dc618d055 --- /dev/null +++ b/gitlab-ci/docker/version-stable.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +## print the stable version tag for this version to the console + +version=head -n1 ../../VERSION +echo "${VERSION%.*}-stable" diff --git a/gitlab-ci/docker/version.sh b/gitlab-ci/docker/version.sh new file mode 100644 index 0000000000000000000000000000000000000000..cfc89a3ebf0b6fa8cc644d58b94399ab84e08346 --- /dev/null +++ b/gitlab-ci/docker/version.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +## print the full version number to the console + +head -n1 ../../VERSION diff --git a/.gitlabci/build.sh b/gitlab-ci/singularity/build.sh similarity index 100% rename from .gitlabci/build.sh rename to gitlab-ci/singularity/build.sh diff --git a/deploy.py b/install.py similarity index 100% rename from deploy.py rename to install.py