Skip to content
Snippets Groups Projects
Commit 0e02d013 authored by Maria Petrova-El Sayed's avatar Maria Petrova-El Sayed
Browse files

deploy on open stack (with logic from Jj)

parent fea4da05
No related branches found
No related tags found
2 merge requests!3Update .gitlab-ci.yml,!2Merge CI/CD settings and get current progress on docker-compose
...@@ -4,14 +4,11 @@ variables: ...@@ -4,14 +4,11 @@ variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
APP_VERSION: "beta" APP_VERSION: "beta"
MOUNT_POINT: /builds/$CI_PROJECT_PATH/mnt
stages: stages:
- test - test
- build - build
- deploy - deploy
# - image
- transfer
test: test:
stage: test stage: test
...@@ -36,7 +33,6 @@ pages: ...@@ -36,7 +33,6 @@ pages:
dependencies: dependencies:
- build:sites - build:sites
script: script:
# - docker run -d --name my_container -p https://rybicki1.pages.jsc.fz-juelich.de/datacatalog/ -d $CI_REGISTRY_IMAGE:$APP_VERSION
- mkdir public - mkdir public
- cp -r site/* public/ - cp -r site/* public/
- echo "Deployment finished. Missing API server" - echo "Deployment finished. Missing API server"
...@@ -54,34 +50,23 @@ deploy: ...@@ -54,34 +50,23 @@ deploy:
OS_INTERFACE: public OS_INTERFACE: public
script: script:
- echo "Doing nothing for now" - echo "Doing nothing for now"
- pip install python-openstackclient
- openstack image list
- openstack server create --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 pipeline-inst
- docker build --no-cache=true --pull -f ./apiserver/Dockerfile .
- docker run
# build:image:
# cache: {}
# stage: image
# image: docker:latest
# only:
# - mptest
# script:
# - echo "Deployment starting..."
# - mkdir -p "$MOUNT_POINT"
# - docker build --no-cache=true --pull -f ./apiserver/Dockerfile -t $CI_REGISTRY_IMAGE:$APP_VERSION .
transfer_image: # This should be an automatic push of the docker image into gitLab container repository
stage: transfer # Currently not working due to docker login failing because of firewall issues
image: docker:19.03.12 # transfer_image:
services: # stage: transfer
- name: docker:19.03.12-dind # image: docker:19.03.12
alias: docker # services:
variables: # - docker:19.03.12-dind
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG # variables:
script: # IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
- echo "Job token:" $CI_JOB_USER # script:
- echo "Deploy user:" $CI_DEPLOY_USER # - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- echo $GITHUB_USER # - docker build --no-cache=true --pull -f ./apiserver/Dockerfile -t $IMAGE_TAG .
- echo $CI_REGISTRY_USER # - docker push $IMAGE_TAG
- echo $CI_REGISTRY
- docker login -u $CI_JOB_USER -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --no-cache=true --pull -f ./apiserver/Dockerfile -t $IMAGE_TAG .
- docker push $IMAGE_TAG
# only:
# - mptest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment