Files
detections/.woodpecker/build-push-jetson-trt104.yml
T
Roman Meshko b8ebf0f15d
ci/woodpecker/manual/build-push-jetson-trt104 Pipeline failed
Fixed pipeline
2026-06-07 12:13:19 +03:00

38 lines
1.4 KiB
YAML

when:
- event: [manual]
evaluate: 'BUILD_JETSON_TRT104 == "1"'
labels:
platform: arm64
steps:
- name: build-push-jetson-trt104
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
- |
RAW_BRANCH="${CI_COMMIT_BRANCH:-${WOODPECKER_COMMIT_BRANCH:-${CI_COMMIT_REF:-${WOODPECKER_COMMIT_REF:-manual}}}}"
SAFE_BRANCH=$(printf '%s' "$RAW_BRANCH" | sed 's#^refs/heads/##; s#^refs/tags/##; s#[^A-Za-z0-9_.-]#-#g; s#^-*##; s#-*$##')
SAFE_BRANCH="${SAFE_BRANCH:-manual}"
TAG="${SAFE_BRANCH}-arm-trt104"
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo "RAW_BRANCH=$RAW_BRANCH"
echo "SAFE_BRANCH=$SAFE_BRANCH"
echo "TAG=$TAG"
docker build -f Dockerfile.jetson.trt104 \
--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/detections:$TAG .
docker push $REGISTRY_HOST/azaion/detections:$TAG
volumes:
- /var/run/docker.sock:/var/run/docker.sock