Commit 28bbf6ba authored by Pablo Panero's avatar Pablo Panero
Browse files

Bug Fix dev gitlab-ci namespace and os server

parent 2c2db009
......@@ -10,8 +10,8 @@ variables:
RESOURCE: cern-search-rest-api
###
### You shouldn't change the following variables
NAMESPACE: openshift
OPENSHIFT_SERVER: https://openshift-dev.cern.ch
NAMESPACE_DEV: test-cern-search-master
OPENSHIFT_SERVER_DEV: https://openshift-dev.cern.ch
### By default, there are 6 stages that we may use:
......@@ -25,7 +25,7 @@ stages:
### 'Build' stage
### Build the image and store it in the registry. It is important that this step
### doesn't override the image the applications are running, as we haven't tested the image yet
########## DEV ##########
build_dev_version:
stage: build
except:
......@@ -36,6 +36,7 @@ build_dev_version:
- docker-image-build
script: 'echo "Building Dev/QA Docker image..."'
########## ALL ##########
### When building tags, use the git tag as the docker tag of the image
build_tagged_version:
stage: build
......@@ -47,6 +48,7 @@ build_tagged_version:
variables:
TO: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
########## DEV ##########
### If a new tag is pushed it needs to be referenced into the ImageStream
tag_image_dev: &tag_image
stage: tag_image
......@@ -55,16 +57,17 @@ tag_image_dev: &tag_image
environment: staging
image: gitlab-registry.cern.ch/paas-tools/openshift-client:latest
script:
- oc tag --source=docker ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} ${RESOURCE}:${CI_COMMIT_TAG} --token=${TOKEN} --server=${OPENSHIFT_SERVER} -n ${NAMESPACE}
- oc tag --source=docker ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG} ${RESOURCE}:${CI_COMMIT_TAG} --token=${TOKEN} --server=${OPENSHIFT_SERVER_DEV} -n ${NAMESPACE_DEV}
variables:
TOKEN: ${SERVICE_ACCOUNT_TOKEN_DEV}
########## DEV ##########
### Import image into OpenShift. Import $CI_COMMIT_TAG if present or 'latest' if not.
import_image_dev:
stage: import_image
environment: staging
image: gitlab-registry.cern.ch/paas-tools/openshift-client:latest
script:
- oc import-image ${RESOURCE}:${CI_COMMIT_TAG:-latest} --token=${TOKEN} --server=${OPENSHIFT_SERVER} -n ${NAMESPACE}
- oc import-image ${RESOURCE}:${CI_COMMIT_TAG:-latest} --token=${TOKEN} --server=${OPENSHIFT_SERVER_DEV} -n ${NAMESPACE_DEV}
variables:
TOKEN: ${SERVICE_ACCOUNT_TOKEN_DEV}
\ No newline at end of file
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