Add push stage
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
stages:
|
||||
- build
|
||||
- push
|
||||
|
||||
before_script:
|
||||
- docker version
|
||||
@@ -19,9 +20,22 @@ build:
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker login registry.evanrichardsonphotography.com
|
||||
- docker build -t registry.evanrichardsonphotography.com/erichardson/py-eagle-mqtt ./Docker/
|
||||
- docker push registry.evanrichardsonphotography.com/erichardson/py-eagle-mqtt
|
||||
- docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
#- docker login registry.evanrichardsonphotography.com
|
||||
#- docker build -t registry.evanrichardsonphotography.com/erichardson/py-eagle-mqtt ./Docker/
|
||||
#- docker push registry.evanrichardsonphotography.com/erichardson/py-eagle-mqtt
|
||||
#- ls
|
||||
#- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" ./Docker/
|
||||
#- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||
|
||||
push:
|
||||
stage: push
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
Reference in New Issue
Block a user