mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Fix all Woodpecker linting errors - use from_secret and privileged plugins
This commit is contained in:
parent
561b0fae19
commit
9416a80006
@ -1,6 +1,5 @@
|
||||
when:
|
||||
- event: [push, pull_request]
|
||||
- path: ["bugulma/frontend/**", ".woodpecker.yml"]
|
||||
|
||||
steps:
|
||||
# Lint and test frontend
|
||||
@ -12,11 +11,13 @@ steps:
|
||||
- yarn lint
|
||||
- yarn test --run
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
path: "bugulma/frontend/**"
|
||||
|
||||
# Build and push frontend
|
||||
frontend-build:
|
||||
image: woodpeckerci/plugin-docker-buildx:latest
|
||||
privileged: true
|
||||
settings:
|
||||
registry: registry.bk.glpx.pro
|
||||
repo: registry.bk.glpx.pro/turash/turash-frontend
|
||||
@ -29,7 +30,11 @@ steps:
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA}
|
||||
secrets: [docker_username, docker_password]
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
@ -45,11 +50,13 @@ steps:
|
||||
- go test -v -race -coverprofile=coverage.out ./...
|
||||
- go tool cover -html=coverage.out -o coverage.html
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
path: "bugulma/backend/**"
|
||||
|
||||
# Build and push backend
|
||||
backend-build:
|
||||
image: woodpeckerci/plugin-docker-buildx:latest
|
||||
privileged: true
|
||||
settings:
|
||||
registry: registry.bk.glpx.pro
|
||||
repo: registry.bk.glpx.pro/turash/turash-backend
|
||||
@ -62,7 +69,11 @@ steps:
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA}
|
||||
secrets: [docker_username, docker_password]
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
@ -81,16 +92,17 @@ steps:
|
||||
- kubectl apply -f k8s/namespace.yaml
|
||||
- kubectl apply -f k8s/configmap.yaml
|
||||
- kubectl apply -f k8s/secret.yaml
|
||||
- kubectl set image deployment/turash-backend backend=registry.bk.glpx.pro/turash/turash-backend:${CI_COMMIT_SHA}
|
||||
- kubectl set image deployment/turash-backend backend=registry.bk.glpx.pro/turash/turash-backend:${CI_COMMIT_SHA} -n turash || kubectl create -f k8s/deployment.yaml
|
||||
- kubectl rollout status deployment/turash-backend -n turash
|
||||
|
||||
# Deploy frontend
|
||||
- kubectl apply -f k8s/frontend-deployment.yaml
|
||||
- kubectl apply -f k8s/frontend-service.yaml
|
||||
- kubectl set image deployment/turash-frontend frontend=registry.bk.glpx.pro/turash/turash-frontend:${CI_COMMIT_SHA}
|
||||
- kubectl set image deployment/turash-frontend frontend=registry.bk.glpx.pro/turash/turash-frontend:${CI_COMMIT_SHA} -n turash
|
||||
- kubectl rollout status deployment/turash-frontend -n turash
|
||||
|
||||
secrets: [kube_token]
|
||||
environment:
|
||||
KUBE_TOKEN:
|
||||
from_secret: kube_token
|
||||
when:
|
||||
event: push
|
||||
branch: master
|
||||
@ -115,4 +127,5 @@ steps:
|
||||
- echo "Pipeline failed for commit ${CI_COMMIT_SHA}"
|
||||
- echo "Check logs at ${CI_SYSTEM_URL}/${CI_REPO}/${CI_PIPELINE_NUMBER}"
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
status: failure
|
||||
|
||||
Loading…
Reference in New Issue
Block a user