From 091a5edf8384f314f396206d2849d2ee9a3f75f6 Mon Sep 17 00:00:00 2001 From: Stefan H Date: Thu, 17 Feb 2022 09:49:05 +0100 Subject: [PATCH] Added docker login and push of image --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c42f274..c329d22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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. stage: build - script: - echo "******** Start Build Docker Image ********" - 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. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. - before_script: + before_script: - echo "Login to Docker Hub" - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: + script: - echo "Pushing Image to Docker Hub..." - docker push "$CI_REGISTRY_IMAGE" - echo "Push done"