mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 07:06:33 +00:00
[AZ-205] Authenticate to Harbor before pushing build images
Add HARBOR_USER/HARBOR_TOKEN from Woodpecker secrets and a docker login step before the existing build/push, so pipelines can push to the new TLS-authenticated Harbor registry.
This commit is contained in:
@@ -11,7 +11,12 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
REGISTRY_HOST:
|
REGISTRY_HOST:
|
||||||
from_secret: registry_host
|
from_secret: registry_host
|
||||||
|
HARBOR_USER:
|
||||||
|
from_secret: harbor_user
|
||||||
|
HARBOR_TOKEN:
|
||||||
|
from_secret: harbor_token
|
||||||
commands:
|
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
|
- if [ "$CI_COMMIT_BRANCH" = "main" ]; then export TAG=arm; else export TAG=${CI_COMMIT_BRANCH}-arm; fi
|
||||||
- export BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
- export BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||||
- |
|
- |
|
||||||
|
|||||||
Reference in New Issue
Block a user