From d1cc392219393b38fd49ada478c3c28b137034ed Mon Sep 17 00:00:00 2001 From: M9713 <m9713@student.jamk.fi> Date: Mon, 4 Oct 2021 20:00:43 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 345a7f5..e005662 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,28 +1,24 @@ stages: - - build_back - - build_front - + - build build: - stage: build_back + stage: build - script: echo "Building Backend" image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] + script: + + # Build Backend + + - echo "Building Backend" - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context $CI_PROJECT_DIR/backend-express --dockerfile $CI_PROJECT_DIR/backend-express/Dockerfile --destination $CI_REGISTRY_IMAGE:backend -#$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + + # Build Frontend -build: - stage: build_front - - script: echo "Building Frontend" - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - script: + - echo "Building Frontend" - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --context $CI_PROJECT_DIR/front-react --dockerfile $CI_PROJECT_DIR/front-react/Dockerfile --destination $CI_REGISTRY_IMAGE:backend -#$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG + - /kaniko/executor --context $CI_PROJECT_DIR/front-react --dockerfile $CI_PROJECT_DIR/front-react/Dockerfile --destination $CI_REGISTRY_IMAGE:front + -- GitLab