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:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
- path: ["bugulma/frontend/**", ".woodpecker.yml"]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Lint and test frontend
|
# Lint and test frontend
|
||||||
@ -12,11 +11,13 @@ steps:
|
|||||||
- yarn lint
|
- yarn lint
|
||||||
- yarn test --run
|
- yarn test --run
|
||||||
when:
|
when:
|
||||||
|
event: [push, pull_request]
|
||||||
path: "bugulma/frontend/**"
|
path: "bugulma/frontend/**"
|
||||||
|
|
||||||
# Build and push frontend
|
# Build and push frontend
|
||||||
frontend-build:
|
frontend-build:
|
||||||
image: woodpeckerci/plugin-docker-buildx:latest
|
image: woodpeckerci/plugin-docker-buildx:latest
|
||||||
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
registry: registry.bk.glpx.pro
|
registry: registry.bk.glpx.pro
|
||||||
repo: registry.bk.glpx.pro/turash/turash-frontend
|
repo: registry.bk.glpx.pro/turash/turash-frontend
|
||||||
@ -29,7 +30,11 @@ steps:
|
|||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- ${CI_COMMIT_SHA}
|
- ${CI_COMMIT_SHA}
|
||||||
secrets: [docker_username, docker_password]
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: master
|
branch: master
|
||||||
@ -45,11 +50,13 @@ steps:
|
|||||||
- go test -v -race -coverprofile=coverage.out ./...
|
- go test -v -race -coverprofile=coverage.out ./...
|
||||||
- go tool cover -html=coverage.out -o coverage.html
|
- go tool cover -html=coverage.out -o coverage.html
|
||||||
when:
|
when:
|
||||||
|
event: [push, pull_request]
|
||||||
path: "bugulma/backend/**"
|
path: "bugulma/backend/**"
|
||||||
|
|
||||||
# Build and push backend
|
# Build and push backend
|
||||||
backend-build:
|
backend-build:
|
||||||
image: woodpeckerci/plugin-docker-buildx:latest
|
image: woodpeckerci/plugin-docker-buildx:latest
|
||||||
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
registry: registry.bk.glpx.pro
|
registry: registry.bk.glpx.pro
|
||||||
repo: registry.bk.glpx.pro/turash/turash-backend
|
repo: registry.bk.glpx.pro/turash/turash-backend
|
||||||
@ -62,7 +69,11 @@ steps:
|
|||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- ${CI_COMMIT_SHA}
|
- ${CI_COMMIT_SHA}
|
||||||
secrets: [docker_username, docker_password]
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: master
|
branch: master
|
||||||
@ -81,16 +92,17 @@ steps:
|
|||||||
- kubectl apply -f k8s/namespace.yaml
|
- kubectl apply -f k8s/namespace.yaml
|
||||||
- kubectl apply -f k8s/configmap.yaml
|
- kubectl apply -f k8s/configmap.yaml
|
||||||
- kubectl apply -f k8s/secret.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
|
- kubectl rollout status deployment/turash-backend -n turash
|
||||||
|
|
||||||
# Deploy frontend
|
# Deploy frontend
|
||||||
- kubectl apply -f k8s/frontend-deployment.yaml
|
- kubectl apply -f k8s/frontend-deployment.yaml
|
||||||
- kubectl apply -f k8s/frontend-service.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
|
- kubectl rollout status deployment/turash-frontend -n turash
|
||||||
|
environment:
|
||||||
secrets: [kube_token]
|
KUBE_TOKEN:
|
||||||
|
from_secret: kube_token
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
branch: master
|
branch: master
|
||||||
@ -115,4 +127,5 @@ steps:
|
|||||||
- echo "Pipeline failed for commit ${CI_COMMIT_SHA}"
|
- echo "Pipeline failed for commit ${CI_COMMIT_SHA}"
|
||||||
- echo "Check logs at ${CI_SYSTEM_URL}/${CI_REPO}/${CI_PIPELINE_NUMBER}"
|
- echo "Check logs at ${CI_SYSTEM_URL}/${CI_REPO}/${CI_PIPELINE_NUMBER}"
|
||||||
when:
|
when:
|
||||||
|
event: [push, pull_request]
|
||||||
status: failure
|
status: failure
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user