mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 07:16:33 +00:00
Update Woodpecker pipeline to use new registry authentication variables
ci/woodpecker/manual/build-arm Pipeline failed
ci/woodpecker/manual/build-arm Pipeline failed
Replaced HARBOR_USER and HARBOR_TOKEN with REGISTRY_USER and REGISTRY_TOKEN for Docker login. Updated image tagging and pushing to reflect the new registry path. Simplified environment variable exports for publish artifact step.
This commit is contained in:
+11
-17
@@ -11,13 +11,13 @@ steps:
|
||||
environment:
|
||||
REGISTRY_HOST:
|
||||
from_secret: registry_host
|
||||
HARBOR_USER:
|
||||
from_secret: harbor_user
|
||||
HARBOR_TOKEN:
|
||||
from_secret: harbor_token
|
||||
REGISTRY_USER:
|
||||
from_secret: registry_user
|
||||
REGISTRY_TOKEN:
|
||||
from_secret: registry_token
|
||||
commands:
|
||||
- echo "$HARBOR_TOKEN" | docker login "$REGISTRY_HOST" -u "$HARBOR_USER" --password-stdin
|
||||
- if [ "$CI_COMMIT_BRANCH" = "main" ]; then export TAG=arm; else export TAG=${CI_COMMIT_BRANCH}-arm; fi
|
||||
- echo "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin
|
||||
- export TAG=${CI_COMMIT_BRANCH}-arm
|
||||
- export BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
- |
|
||||
docker build -f Dockerfile \
|
||||
@@ -25,21 +25,15 @@ steps:
|
||||
--label org.opencontainers.image.revision=$CI_COMMIT_SHA \
|
||||
--label org.opencontainers.image.created=$BUILD_DATE \
|
||||
--label org.opencontainers.image.source=$CI_REPO_URL \
|
||||
-t $REGISTRY_HOST/loader:$TAG .
|
||||
- docker push $REGISTRY_HOST/loader:$TAG
|
||||
- docker save $REGISTRY_HOST/loader:$TAG -o loader-image.tar
|
||||
-t $REGISTRY_HOST/azaion/loader:$TAG .
|
||||
- docker push $REGISTRY_HOST/azaion/loader:$TAG
|
||||
- docker save $REGISTRY_HOST/azaion/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
|
||||
- export PUBLISH_DEV_STAGE=$CI_COMMIT_BRANCH
|
||||
- export TAG=${CI_COMMIT_BRANCH}-arm
|
||||
- python scripts/publish_artifact.py --file loader-image.tar --resource-name loader --dev-stage "$PUBLISH_DEV_STAGE" --architecture arm64 --version "$CI_COMMIT_SHA"
|
||||
|
||||
Reference in New Issue
Block a user