fixe ci pipleine
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / release (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / release (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
# Peikarband Platform - Woodpecker CI/CD Pipeline
|
||||
variables:
|
||||
- &harbor_registry "hub.peikarband.ir"
|
||||
- &image_name "peikarband/landing"
|
||||
# Harbor registry: hub.peikarband.ir (مطابق با values-prd.yaml)
|
||||
|
||||
steps:
|
||||
# مرحله ساخت با Kaniko Executor (مستقیم - مطمئنتر از plugin)
|
||||
build-and-push:
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
registry: *harbor_registry
|
||||
repo: *image_name
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA:0:8}
|
||||
username:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
insecure: false
|
||||
skip_tls_verify: false
|
||||
image: gcr.io/kaniko-project/executor:latest
|
||||
secrets:
|
||||
- harbor_username
|
||||
- harbor_password
|
||||
commands:
|
||||
# ساخت Docker config برای Harbor
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"hub.peikarband.ir\":{\"username\":\"$${HARBOR_USERNAME}\",\"password\":\"$${HARBOR_PASSWORD}\"}}}" > /kaniko/.docker/config.json
|
||||
# Build و Push به Harbor
|
||||
- /kaniko/executor
|
||||
--dockerfile=Dockerfile
|
||||
--context=dir://.
|
||||
--destination=hub.peikarband.ir/peikarband/landing:latest
|
||||
--destination=hub.peikarband.ir/peikarband/landing:${CI_COMMIT_SHA:0:8}
|
||||
--insecure=false
|
||||
--skip-tls-verify=false
|
||||
--digest-file=/kaniko/digest-file
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user