mirror of
https://github.com/azaion/loader.git
synced 2026-04-26 16:46:32 +00:00
4f5fe70f3f
- Added 'e2e/results/' to .gitignore to exclude end-to-end test results. - Deleted the outdated Woodpecker build-arm.yml file as it is no longer needed. - Introduced a new e2e-runner service in docker-compose.test.yml to facilitate end-to-end testing with dependencies on other services.
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
when:
|
|
event: [push, manual]
|
|
branch: [dev, stage, main]
|
|
|
|
depends_on:
|
|
- 01-test
|
|
|
|
# Multi-arch matrix. One workflow file, one entry per architecture. Adding
|
|
# amd64 = appending an entry below; no second pipeline file required.
|
|
matrix:
|
|
include:
|
|
- PLATFORM: arm64
|
|
TAG_SUFFIX: arm
|
|
# - PLATFORM: amd64
|
|
# TAG_SUFFIX: amd
|
|
|
|
labels:
|
|
platform: ${PLATFORM}
|
|
|
|
steps:
|
|
- name: build-push
|
|
image: docker
|
|
environment:
|
|
REGISTRY_HOST:
|
|
from_secret: registry_host
|
|
REGISTRY_USER:
|
|
from_secret: registry_user
|
|
REGISTRY_TOKEN:
|
|
from_secret: registry_token
|
|
commands:
|
|
- echo "$REGISTRY_TOKEN" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin
|
|
- export TAG=${CI_COMMIT_BRANCH}-${TAG_SUFFIX}
|
|
- export BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
- |
|
|
docker build -f Dockerfile \
|
|
--build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA \
|
|
--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/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
|
|
- export PUBLISH_DEV_STAGE=$CI_COMMIT_BRANCH
|
|
- export TAG=${CI_COMMIT_BRANCH}-${TAG_SUFFIX}
|
|
- python scripts/publish_artifact.py --file loader-image.tar --resource-name loader --dev-stage "$PUBLISH_DEV_STAGE" --architecture ${PLATFORM} --version "$CI_COMMIT_SHA"
|