Commit f613b2e0 authored by David Diederich's avatar David Diederich
Browse files

Added CI/CD Pipeline to build and deploy this image

parent 48afe8a4
Pipeline #80 failed with stage
in 19 seconds
# Required Project Variables:
# DOCKER_HUB_ACCOUNT The name of the account to publish under (could be a username or an organization)
# DOCKER_HUB_USER The username to use for authenticating with DockerHub
# DOCKER_HUB_PASSWORD The password (or access token) for authenticating with DockerHub
# --------------------------------------------------------------------------------
image: docker:19.03
stages:
- build
# --------------------------------------------------------------------------------
incremental:
stage: build
tags: ['docker-runner']
variables:
SHA_IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $SHA_IMAGE_TAG .
- docker push $SHA_IMAGE_TAG
release:
stage: build
tags: ['docker-runner']
only: ['tags']
variables:
RELEASE_IMAGE_TAG: $DOCKER_HUB_ACCOUNT/$CI_PROJECT_NAME:$CI_COMMIT_TAG
script:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
- docker build -t $RELEASE_IMAGE_TAG .
- docker push $RELEASE_IMAGE_TAG
Markdown is supported
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