fixe ci pipleine
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/manual/woodpecker Pipeline failed
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
CD - Build & Deploy / release (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
ci/woodpecker/manual/woodpecker Pipeline failed
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
CD - Build & Deploy / release (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,33 +1,24 @@
|
|||||||
# Peikarband Platform - Woodpecker CI/CD Pipeline
|
# Peikarband Platform - Woodpecker CI/CD Pipeline
|
||||||
# Harbor: hub.peikarband.ir
|
# Harbor Registry: hub.peikarband.ir
|
||||||
# Project: peikarband
|
# Best Practices Applied
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
commands:
|
settings:
|
||||||
- mkdir -p /kaniko/.docker
|
registry: hub.peikarband.ir
|
||||||
- |
|
repo: hub.peikarband.ir/peikarband/landing
|
||||||
# ساخت Docker config با credentials
|
username:
|
||||||
USERNAME="admin"
|
from_secret: harbor_username
|
||||||
PASSWORD="5459ed7590d37656410fae38bdf59eb7ee33b68cd4c"
|
password:
|
||||||
AUTH=$(echo -n "${USERNAME}:${PASSWORD}" | base64 -w 0)
|
from_secret: harbor_password
|
||||||
cat > /kaniko/.docker/config.json <<EOF
|
tags:
|
||||||
{
|
- latest
|
||||||
"auths": {
|
- ${CI_COMMIT_SHA:0:8}
|
||||||
"hub.peikarband.ir": {
|
dockerfile: Dockerfile
|
||||||
"auth": "${AUTH}"
|
context: .
|
||||||
}
|
platforms: linux/amd64
|
||||||
}
|
cache: true
|
||||||
}
|
insecure: false
|
||||||
EOF
|
|
||||||
echo "Docker config created"
|
|
||||||
- /kaniko/executor
|
|
||||||
--dockerfile=Dockerfile
|
|
||||||
--context=dir://.
|
|
||||||
--destination=hub.peikarband.ir/peikarband/landing:latest
|
|
||||||
--destination=hub.peikarband.ir/peikarband/landing:${CI_COMMIT_SHA:0:8}
|
|
||||||
--skip-tls-verify=false
|
|
||||||
--verbosity=info
|
|
||||||
when:
|
when:
|
||||||
event: [push, tag, manual]
|
event: [push, tag, manual]
|
||||||
|
|||||||
Reference in New Issue
Block a user