Created
March 12, 2021 08:55
-
-
Save rt1d6m7/db0f62fbdcac2cf5fde90828671403c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
DOCKER_REGISTRY: 1234.dkr.ecr.ca-central-1.amazonaws.com | |
AWS_DEFAULT_REGION: ca-central-1 | |
APP_NAME: abc | |
DOCKER_HOST: tcp://docker:2375 | |
DOCKER_DRIVER: overlay2 | |
DOCKER_TLS_CERTDIR: "" | |
publish: | |
stage: build | |
image: | |
name: docker:latest | |
services: | |
- docker:19-dind | |
before_script: | |
- apk add --no-cache curl jq python3 py3-pip | |
- pip install awscli | |
- aws ecr get-login-password | docker login --username AWS --password-stdin $DOCKER_REGISTRY | |
- aws --version | |
- docker info | |
- docker --version | |
script: | |
- docker build -t $DOCKER_REGISTRY/$APP_NAME:$CI_PIPELINE_IID . | |
- docker push $DOCKER_REGISTRY/$APP_NAME:$CI_PIPELINE_IID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment