Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kubetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ConduitMiau
kubetest
Commits
802a85c8
Commit
802a85c8
authored
3 years ago
by
M9713
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml
parent
93b41be5
No related branches found
No related tags found
No related merge requests found
Pipeline
#539423
passed
3 years ago
Stage: build robot
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+102
-81
102 additions, 81 deletions
.gitlab-ci.yml
with
102 additions
and
81 deletions
.gitlab-ci.yml
+
102
−
81
View file @
802a85c8
#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
front
end
:
stage
:
build
front
end
#
build
back
end:
#
stage: build
back
end
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment