feat: remove gitlab bits and deploy also when manually triggered
This commit is contained in:
parent
fc30bfcf7f
commit
87797efcf7
4 changed files with 1 additions and 73 deletions
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
# gitLab ci stages
|
|
||||||
stages:
|
|
||||||
|
|
||||||
# stages
|
|
||||||
- "gitleaks"
|
|
||||||
- "linting"
|
|
||||||
- "build"
|
|
||||||
- "deployment"
|
|
||||||
|
|
||||||
|
|
||||||
# include jobs
|
|
||||||
include:
|
|
||||||
|
|
||||||
# locals
|
|
||||||
- local: ".gitlab/build.yaml"
|
|
||||||
- local: ".gitlab/deployment.yaml"
|
|
||||||
|
|
||||||
# components
|
|
||||||
- component: "$CI_SERVER_FQDN/components/gitleaks/gitleaks@v1.0.0"
|
|
||||||
- component: "$CI_SERVER_FQDN/components/markdownlint/markdownlint@1.0.0"
|
|
||||||
- component: "$CI_SERVER_FQDN/components/yamllint/yamllint@1.0.2"
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
variables:
|
|
||||||
STORAGE_DRIVER: "overlay"
|
|
||||||
IMAGE_TAG: "docs-simoncor-net"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- "build"
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: "build"
|
|
||||||
image: "quay.io/buildah/stable:latest"
|
|
||||||
script:
|
|
||||||
|
|
||||||
# login to container registry
|
|
||||||
- "echo $CI_REGISTRY_PASSWORD | buildah login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY"
|
|
||||||
|
|
||||||
# build image
|
|
||||||
- "buildah bud -t $IMAGE_TAG ."
|
|
||||||
|
|
||||||
# tag image
|
|
||||||
- "buildah tag $IMAGE_TAG $CI_REGISTRY_IMAGE:latest"
|
|
||||||
|
|
||||||
# push image
|
|
||||||
- "buildah push $CI_REGISTRY_IMAGE:latest"
|
|
||||||
|
|
||||||
# logout
|
|
||||||
- "buildah logout $CI_REGISTRY"
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
# deploy container on kubernetes
|
|
||||||
deployment:
|
|
||||||
stage: "deployment"
|
|
||||||
image:
|
|
||||||
name: "quay.io/argoproj/argocd:v3.2.5"
|
|
||||||
entrypoint: [""]
|
|
||||||
rules:
|
|
||||||
|
|
||||||
# run only on push to default branch
|
|
||||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
||||||
- when: "never"
|
|
||||||
|
|
||||||
script:
|
|
||||||
|
|
||||||
# execute a rollout restart using argocd
|
|
||||||
- "argocd app actions run docs-simoncor-net restart \
|
|
||||||
--kind Deployment \
|
|
||||||
--resource-name docs-simoncor-net \
|
|
||||||
--server $ARGOCD_SERVER \
|
|
||||||
--auth-token $ARGOCD_AUTH_TOKEN \
|
|
||||||
--grpc-web"
|
|
||||||
|
|
@ -4,6 +4,7 @@ skip_clone: true
|
||||||
when:
|
when:
|
||||||
- event: "push"
|
- event: "push"
|
||||||
branch: "main"
|
branch: "main"
|
||||||
|
- event: "manual"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue