Skip to content
Snippets Groups Projects
Commit ae207a15 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

-ops added CAPO_PATH variable to Dockerfile.base

parent bd27dabf
No related branches found
No related tags found
1 merge request!50-ops added CAPO_PATH variable to Dockerfile.base
Pipeline #409 passed
......@@ -31,7 +31,8 @@ include:
build base image:
stage: build-base
script:
- docker build -t ${REGISTRY_URL}/ops/base:${PROJECT_NAME} -f Dockerfile.base . ; \
- docker build -t ${REGISTRY_URL}/ops/base:${PROJECT_NAME} -f Dockerfile.base .
- docker tag ${REGISTRY_URL}/ops/base:${PROJECT_NAME} ${REGISTRY_URL}/ops/base:${CI_COMMIT_SHORT_SHA}
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_MESSAGE =~ /\A(?i)-ops/'
changes:
......@@ -43,11 +44,11 @@ push base image:
script:
- echo "$HARBOR_PASSWORD" | docker login -u "$HARBOR_USER" --password-stdin $REGISTRY_URL
- docker push ${REGISTRY_URL}/ops/base:${PROJECT_NAME}
- docker push ${REGISTRY_URL}/ops/base:${CI_COMMIT_SHORT_SHA}
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_MESSAGE =~ /\A(?i)-ops/'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /\A(?i)-ops/'
changes:
- Dockerfile.base
when: always
# Build Stages
build dev workflow:
......@@ -76,18 +77,24 @@ unit test dev workflow:
variables:
SERVICE_NAME: "workflow"
extends: .unit-test
needs:
- build dev workflow
unit test dev capability:
stage: unit-test-dev
variables:
SERVICE_NAME: "capability"
extends: .unit-test
needs:
- build dev capability
unit test dev notification:
stage: unit-test-dev
variables:
SERVICE_NAME: "notification"
extends: .unit-test
needs:
- build dev notification
# Push Stages
push dev workflow:
......@@ -96,7 +103,7 @@ push dev workflow:
SERVICE_NAME: "workflow"
extends: .push
needs:
- build dev workflow
- unit test dev workflow
push dev capability:
stage: push-dev
......@@ -104,7 +111,7 @@ push dev capability:
SERVICE_NAME: "capability"
extends: .push
needs:
- build dev capability
- unit test dev capability
push dev notification:
stage: push-dev
......@@ -112,7 +119,7 @@ push dev notification:
SERVICE_NAME: "notification"
extends: .push
needs:
- build dev notification
- unit test dev notification
# Cleanup
clean build workflow:
......@@ -120,24 +127,18 @@ clean build workflow:
variables:
SERVICE_NAME: "workflow"
extends: .cleanup
needs:
- build dev workflow
clean build capability:
stage: clean-images
variables:
SERVICE_NAME: "capability"
extends: .cleanup
needs:
- build dev capability
clean build notification:
stage: clean-images
variables:
SERVICE_NAME: "notification"
extends: .cleanup
needs:
- build dev notification
# Deploy Stages
......
......@@ -12,6 +12,7 @@ RUN apt-get update \
# - CAPO_PROFILE will be overridden for Dev, Test, and Prod
ENV PIP_NO_CACHE_DIR false
ENV CAPO_PROFILE docker
ENV CAPO_PATH /root/.capo
# Set up Capo
WORKDIR /root/.capo
......
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