From ba8644b8db698beee59425c1e997117c77bfa764 Mon Sep 17 00:00:00 2001 From: M9713 <m9713@student.jamk.fi> Date: Mon, 1 Nov 2021 20:43:17 +0200 Subject: [PATCH] Add new file --- conduit-backend/.gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 conduit-backend/.gitlab-ci.yml diff --git a/conduit-backend/.gitlab-ci.yml b/conduit-backend/.gitlab-ci.yml new file mode 100644 index 0000000..5e4697b --- /dev/null +++ b/conduit-backend/.gitlab-ci.yml @@ -0,0 +1,36 @@ +stages: + - build + - deploy + +build: + stage: build + + when: manual + + 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/conduit-backend --dockerfile $CI_PROJECT_DIR/conduit-backend/Dockerfile --destination $CI_REGISTRY_IMAGE:backend + +deploy: + +# tags: +# - examplee + + stage: deploy + + when: manual + + script: echo "Deploying" + image: bitnami/kubectl:latest + script: + - kubectl apply -f service.yaml + - kubectl apply -f deployment.yaml + - kubectl -n default rollout restart deployment default -- GitLab