Skip to content
Snippets Groups Projects
Commit 802a85c8 authored by M9713's avatar M9713
Browse files

Update .gitlab-ci.yml

parent 93b41be5
No related branches found
No related tags found
No related merge requests found
Pipeline #539423 passed
#include:
# - template: Dependency-Scanning.gitlab-ci.yml
# - template: Security/License-Scanning.gitlab-ci.yml
# - template: Security/Secret-Detection.gitlab-ci.yml
# - template: Security/SAST.gitlab-ci.yml
# - template: DAST.gitlab-ci.yml
stages:
- build backend
- build frontend
# - test
- deploy mongodb
- deploy backend
- deploy frontend
# - dast
#variables:
# DAST_WEBSITE: "http://vm3733.kaj.pouta.csc.fi:30100/"
# DAST_FULL_SCAN_ENABLED: "true"
# DAST_AUTH_URL: "http://vm3733.kaj.pouta.csc.fi:30100/login"
# DAST_AUTH_USERNAME: “DAST”
# DAST_AUTH_PASSWORD: “DAST”
# SAST_GOSEC_LEVEL: 2
build backend:
stage: build backend
when: manual
stages:
- build robot
build robot:
stage: build robot
image:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
#Build Backend
script:
#Build robot
- echo "Building Backend"
- echo "Building robot"
- 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
- /kaniko/executor --context $CI_PROJECT_DIR/robot-framework --dockerfile $CI_PROJECT_DIR/robot-framework/Dockerfile --destination $CI_REGISTRY_IMAGE:robot
# #include:
# # - template: Dependency-Scanning.gitlab-ci.yml
# # - template: Security/License-Scanning.gitlab-ci.yml
# # - template: Security/Secret-Detection.gitlab-ci.yml
# # - template: Security/SAST.gitlab-ci.yml
# # - template: DAST.gitlab-ci.yml
# stages:
# - build backend
# - build frontend
# # - test
# - deploy mongodb
# - deploy backend
# - deploy frontend
# # - dast
# #variables:
# # DAST_WEBSITE: "http://vm3733.kaj.pouta.csc.fi:30100/"
# # DAST_FULL_SCAN_ENABLED: "true"
# # DAST_AUTH_URL: "http://vm3733.kaj.pouta.csc.fi:30100/login"
# # DAST_AUTH_USERNAME: “DAST”
# # DAST_AUTH_PASSWORD: “DAST”
# # SAST_GOSEC_LEVEL: 2
build frontend:
stage: build frontend
# build backend:
# stage: build backend
when: manual
# when: manual
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
# image:
# name: gcr.io/kaniko-project/executor:debug
# entrypoint: [""]
script:
# script:
# Build Frontend
# #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
- 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/conduit-front --dockerfile $CI_PROJECT_DIR/conduit-front/Dockerfile --destination $CI_REGISTRY_IMAGE:front
# build frontend:
# stage: build frontend
# when: manual
# image:
# name: gcr.io/kaniko-project/executor:debug
# entrypoint: [""]
# script:
# # Build Frontend
# - 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/conduit-front --dockerfile $CI_PROJECT_DIR/conduit-front/Dockerfile --destination $CI_REGISTRY_IMAGE:front
deploy mongodb:
# deploy mongodb:
# tags:
# - example
# # tags:
# # - example
stage: deploy mongodb
# stage: deploy mongodb
when: manual
# when: manual
# script: echo "Deploying"
image: bitnami/kubectl:latest
script:
# # script: echo "Deploying"
# image: bitnami/kubectl:latest
# script:
# - kubectl apply -k $CI_PROJECT_DIR/conduit-db/kustomization.yaml
# # - kubectl apply -k $CI_PROJECT_DIR/conduit-db/kustomization.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-deployment.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-persistent-volume.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-pv-claim.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-service.yaml
- kubectl -n default rollout restart deployment mongo-deployment
# - kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-deployment.yaml
# - kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-persistent-volume.yaml
# - kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-pv-claim.yaml
# - kubectl apply -f $CI_PROJECT_DIR/conduit-db/mongo-service.yaml
# - kubectl -n default rollout restart deployment mongo-deployment
deploy backend:
# deploy backend:
# tags:
# - example
# # tags:
# # - example
stage: deploy backend
# stage: deploy backend
when: manual
# when: manual
# script: echo "Deploying"
image: bitnami/kubectl:latest
script:
# # script: echo "Deploying"
# image: bitnami/kubectl:latest
# script:
- kubectl apply -f $CI_PROJECT_DIR/conduit-backend/backend-service.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-backend/backend-deployment.yaml
- kubectl -n default rollout restart deployment backend
# - kubectl apply -f $CI_PROJECT_DIR/conduit-backend/backend-service.yaml
# - kubectl apply -f $CI_PROJECT_DIR/conduit-backend/backend-deployment.yaml
# - kubectl -n default rollout restart deployment backend
deploy frontend:
# deploy frontend:
# tags:
# - example
# # tags:
# # - example
stage: deploy frontend
# stage: deploy frontend
when: manual
# when: manual
# script: echo "Deploying"
image: bitnami/kubectl:latest
script:
# # script: echo "Deploying"
# image: bitnami/kubectl:latest
# script:
- kubectl apply -f $CI_PROJECT_DIR/conduit-front/front-service.yaml
- kubectl apply -f $CI_PROJECT_DIR/conduit-front/front-deployment.yaml
- kubectl -n default rollout restart deployment front
# - kubectl apply -f $CI_PROJECT_DIR/conduit-front/front-service.yaml
# - kubectl apply -f $CI_PROJECT_DIR/conduit-front/front-deployment.yaml
# - kubectl -n default rollout restart deployment front
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment