Added docker login and push of image
This commit is contained in:
parent
a716d7473a
commit
091a5edf83
1 changed files with 2 additions and 3 deletions
|
@ -19,7 +19,6 @@ stages: # List of stages for jobs, and their order of execution
|
||||||
|
|
||||||
build-job: # This job runs in the build stage, which runs first.
|
build-job: # This job runs in the build stage, which runs first.
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- echo "******** Start Build Docker Image ********"
|
- echo "******** Start Build Docker Image ********"
|
||||||
- docker build -t php-apache-rsvg .
|
- docker build -t php-apache-rsvg .
|
||||||
|
@ -27,10 +26,10 @@ build-job: # This job runs in the build stage, which runs first.
|
||||||
|
|
||||||
deploy-job: # This job runs in the deploy stage.
|
deploy-job: # This job runs in the deploy stage.
|
||||||
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||||
before_script:
|
before_script:
|
||||||
- echo "Login to Docker Hub"
|
- echo "Login to Docker Hub"
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- echo "Pushing Image to Docker Hub..."
|
- echo "Pushing Image to Docker Hub..."
|
||||||
- docker push "$CI_REGISTRY_IMAGE"
|
- docker push "$CI_REGISTRY_IMAGE"
|
||||||
- echo "Push done"
|
- echo "Push done"
|
||||||
|
|
Loading…
Reference in a new issue