Skip to content
Snippets Groups Projects
Commit f5b4c023 authored by Diogo Castro's avatar Diogo Castro
Browse files

Pipeline for automatic build

parent 7a705911
No related branches found
No related tags found
1 merge request!3Pipeline for automatic build
Pipeline #525336 passed
variables:
NAME: gitlab-registry.cern.ch/swan/docker-images/notebook
stages:
- build
- deploy
- clean
build_image:
stage: build
script: docker build --compress --rm -t $CI_COMMIT_SHA .
except:
- web
- master
publish_image:
stage: deploy
script:
- docker tag $CI_COMMIT_SHA $NAME:$CI_COMMIT_TAG
- docker login gitlab-registry.cern.ch -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker push $NAME:$CI_COMMIT_TAG
- docker logout
only:
- /^v.*$/
except:
- web
when: on_success
clean_images:
stage: clean
script:
- docker rmi $CI_COMMIT_SHA
except:
- master
- web
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment