diff --git a/conduit-backend/.gitlab-ci.yml b/conduit-backend/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e4697b58bba78574343ecd2247ab5f3ce3df004 --- /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