Skip to content
Snippets Groups Projects
Commit 4f2736d4 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: .gitlab-ci.yml

	modified:   containers/docker/Makefile
	modified:   containers/singularity/Singularity
parent 14adee26
No related branches found
No related tags found
No related merge requests found
......@@ -4,90 +4,34 @@ image: whit/image_recipes/ubuntu_dind:latest
stages:
- build
- test
- phase2
- phase3
# - phase2
singularity:
stage: build
when: manual
script:
- /bin/bash .gitlabci/setup.sh
artifacts:
paths:
- build/Singularity.simg
- build/Singularity
- build/Singularity.broadwell.simg
- build/Singularity.broadwell
# Ubuntu docker build
ubuntu_docker:
stage: phase1
hcana_docker:
stage: build
#when: manual
script:
- docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
- cd ubuntu_base && make release
- docker login eicweb.phy.anl.gov:4567 -u whit -p ${CI_IMAGE_BUILD_PAT}
- cd containers/docker && make build && make publish
# - docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
# - docker tag whit/image_recipes/ubuntu_base:latest eicweb.phy.anl.gov:4567/whit/image_recipes/ubuntu_base:latest
# - docker push eicweb.phy.anl.gov:4567/whit/image_recipes/ubuntu_base:latest
ubuntu_broadwell_docker:
stage: phase1
#when: manual
script:
- docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
- cd ubuntu_base && make release-alt
ubuntu_singular:
stage: phase2
when: manual
script:
- /bin/bash .gitlabci/setup.sh
- mkdir -p build
- cd ubuntu_base && /bin/bash .gitlabci/build.sh Singularity.ubuntu && cp Singularity.ubunbu.simg ../build
- cp ubuntu_base/Singularity.ubuntu build/.
artifacts:
paths:
- build/Singularity.ubuntu.simg
- build/Singularity.ubuntu
# ROOT docker image build
root_docker:
stage: phase2
#when: manual
dependencies:
- ubuntu_docker
script:
#- /bin/bash .gitlabci/setup.sh
- docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
- cd root_base && make release
# - docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
# - docker tag whit/image_recipes/root_base:latest eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
# - docker push eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
#- /bin/bash .gitlabci/setup.sh
root_broadwell_docker:
stage: phase2
hcana_singular:
#stage: phase2
#when: manual
dependencies:
- ubuntu_broadwell_docker
script:
- docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
- cd root_base && make release-alt
root_singular:
stage: phase3
when: manual
- hcana_docker
script:
- /bin/bash .gitlabci/setup.sh
- mkdir -p build
- cd root_base && /bin/bash .gitlabci/build.sh Singularity.root && cp Singularity.ubunbu.simg ../build
- cp root_base/Singularity.root build/.
- cp containers/singularity/Singuilarity Singularity.hcana
- /bin/bash .gitlabci/build.sh Singularity.hcana && cp singularity.hcana.simg ../build
- cp Singularity.hcana build/.
artifacts:
paths:
- build/Singularity.root.simg
- build/Singularity.root
- build/Singularity.ubuntu.simg
- build/Singularity.ubuntu
......@@ -25,6 +25,7 @@ help: ## This help.
.DEFAULT_GOAL := help
# ==========================================================================
#
build: ## build the image
docker build -t $(APP_NAME) .
......@@ -34,12 +35,13 @@ build-nc: ## Build the container without caching (from scratch)
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) .
#docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
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)
......@@ -49,14 +51,14 @@ stop: ## Stop and remove a running container
docker stop $(APP_NAME); docker rm $(APP_NAME)
# ==========================================================================
#
# Docker tagging
tag: tag-latest tag-version ## Generate container tags for the `{version}` ans `latest` tags
tag: tag-latest #tag-version ## Generate container tags for the `{version}` ans `latest` tags
tag-latest: ## Generate container `{version}` tag
@echo 'create tag latest'
docker tag $(APP_NAME) $(REPO)/$(APP_NAME):latest
docker tag $(APP_NAME) $(GL_GROUP)/$(APP_NAME):latest
docker tag $(APP_NAME) $(GL_REG_GROUP)/$(APP_NAME):latest
docker tag $(APP_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME):latest
#docker tag $(APP_NAME) $(REPO)/$(APP_NAME):$(VERSION)
#docker tag $(APP_NAME) $(GL_GROUP)/$(APP_NAME):$(VERSION)
......@@ -78,9 +80,11 @@ tag-alt-version: ## Generate container `{version}` tag
# ==========================================================================
#
login: ## Auto login to AWS-ECR unsing aws-cli
docker login eicweb.phy.anl.gov:4567 -u $(REG_USER) -p $(REG_TOKEN)
release: build publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
#####
publish: login publish-latest #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
push: login ## push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest'
......@@ -111,19 +115,22 @@ publish-alt-version: tag-alt-version ## Publish the `latest` taged container to
@echo 'publish latest to $(REPO)'
docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
# ==========================================================================
#
login: ## Auto login to AWS-ECR unsing aws-cli
docker login eicweb.phy.anl.gov:4567 -u $(REG_USER) -p $(REG_TOKEN)
login-dockerhub: ## Auto login to AWS-ECR unsing aws-cli
login-dockerhub: ## login to hub.docker.com
@echo 'docker hub login :'
docker login
publish-dockerhub: build #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
@echo '$(REPO_NAME)/$(APP_NAME):$(TAG_VERSION)'
docker push $(REPO_NAME)/$(APP_NAME):$(TAG_VERSION)
docker push $(REPO_NAME)/$(APP_NAME):$(VERSION)
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)
# ==========================================================================
#
......
Bootstrap: docker
From: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
From: hallac/hcana:latest
%help
Help me. I'm in the container.
......@@ -16,11 +16,11 @@ From: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
echo "Hello from post"
source /usr/local/bin/thisroot.sh
export PYTHONPATH=/usr/local/lib:$PYTHONPATH
git clone https://gitlab+deploy-token-1:FaNA-Yg4s7hpjvWPZnq8@eicweb.phy.anl.gov/upsilon/Pcsim.git
mkdir Pcsim/build && cd Pcsim/build
cmake ../.
make -j20
make install
#git clone https://gitlab+deploy-token-1:FaNA-Yg4s7hpjvWPZnq8@eicweb.phy.anl.gov/upsilon/Pcsim.git
#mkdir Pcsim/build && cd Pcsim/build
#cmake ../.
#make -j20
#make install
%runscript
......
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