mirror of
https://github.com/azaion/loader.git
synced 2026-04-23 03:46:32 +00:00
0119463023
Pipeline reads $REGISTRY_HOST from the Woodpecker global secret 'registry_host' instead of hardcoding 'localhost:5000'. The full host:port lives in the secret, so Harbor migration (AZ-205) becomes one secret edit rather than editing every submodule pipeline. Made-with: Cursor
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
when:
|
|
event: [push, manual]
|
|
branch: [dev, stage, main]
|
|
|
|
labels:
|
|
platform: arm64
|
|
|
|
steps:
|
|
- name: build-push
|
|
image: docker
|
|
environment:
|
|
REGISTRY_HOST:
|
|
from_secret: registry_host
|
|
commands:
|
|
- if [ "$CI_COMMIT_BRANCH" = "main" ]; then export TAG=arm; else export TAG=${CI_COMMIT_BRANCH}-arm; fi
|
|
- docker build -f Dockerfile -t $REGISTRY_HOST/loader:$TAG .
|
|
- docker push $REGISTRY_HOST/loader:$TAG
|
|
- docker save $REGISTRY_HOST/loader:$TAG -o loader-image.tar
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- name: publish-artifact
|
|
image: python:3.11-slim
|
|
commands:
|
|
- pip install --no-cache-dir boto3==1.40.9 cryptography==44.0.2 requests==2.32.4
|
|
- |
|
|
if [ "$CI_COMMIT_BRANCH" = "main" ]; then
|
|
export PUBLISH_DEV_STAGE=main
|
|
export TAG=arm
|
|
else
|
|
export PUBLISH_DEV_STAGE=$CI_COMMIT_BRANCH
|
|
export TAG=${CI_COMMIT_BRANCH}-arm
|
|
fi
|
|
- python scripts/publish_artifact.py --file loader-image.tar --resource-name loader --dev-stage "$PUBLISH_DEV_STAGE" --architecture arm64 --version "$CI_COMMIT_SHA"
|