Commit d081cc66 authored by Jait Dixit's avatar Jait Dixit
Browse files

Change release stage in ci to trigger only on master and tags

parent f722e14f
Pipeline #9512 canceled with stage
in 7 seconds
...@@ -6,7 +6,8 @@ stages: ...@@ -6,7 +6,8 @@ stages:
variables: variables:
DOCKER_DRIVER: overlay DOCKER_DRIVER: overlay
RELEASE_IMAGE: iftmpa/nifty:ci_test RELEASE_IMAGE_MASTER: iftmpa/nifty:dev
RELEASE_IMAGE_MASTER: iftmpa/nifty:$CI_BUILD_TAG
before_script: before_script:
- apt-get update - apt-get update
...@@ -65,7 +66,7 @@ test_mpi_fftw_hdf5: ...@@ -65,7 +66,7 @@ test_mpi_fftw_hdf5:
- python setup.py build_ext --inplace - python setup.py build_ext --inplace
- nosetests -vv - nosetests -vv
release_image: release_image_master:
image: docker:latest image: docker:latest
stage: release stage: release
before_script: before_script:
...@@ -74,5 +75,21 @@ release_image: ...@@ -74,5 +75,21 @@ release_image:
- docker:dind - docker:dind
script: script:
- docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
- docker build -t $RELEASE_IMAGE . - docker build -t $RELEASE_IMAGE_MASTER .
- docker push $RELEASE_IMAGE - docker push $RELEASE_IMAGE_MASTER
only:
- master
release_image_tagged:
image: docker:latest
stage: release
before_script:
- pwd
services:
- docker:dind
script:
- docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
- docker build -t $RELEASE_IMAGE_TAGGED .
- docker push $RELEASE_IMAGE_TAGGED
only:
- tags
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment