Adding release notes and weekly build support (to pull latest nginx release)
This commit is contained in:
+12
-2
@@ -10,7 +10,8 @@ steps:
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- echo "Building redirect image on host Docker daemon..."
|
||||
- docker build -t redirect:latest .
|
||||
# --pull ensures base image vulnerabilities/patches are pulled on weekly cron builds
|
||||
- docker build --pull -t redirect:latest .
|
||||
- |
|
||||
if [ -n "$DRONE_COMMIT_SHA" ]; then
|
||||
SHORT_SHA=$(echo $DRONE_COMMIT_SHA | cut -c1-7)
|
||||
@@ -22,6 +23,15 @@ steps:
|
||||
docker tag redirect:latest redirect:$DRONE_TAG
|
||||
echo "Tagged redirect:$DRONE_TAG"
|
||||
fi
|
||||
- |
|
||||
# Fetch latest git tag to update the latest release tag (e.g., on weekly cron builds)
|
||||
apk add --no-cache git 2>/dev/null || true
|
||||
git fetch --tags 2>/dev/null || true
|
||||
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
||||
if [ -n "$LATEST_TAG" ]; then
|
||||
docker tag redirect:latest redirect:$LATEST_TAG
|
||||
echo "Tagged latest release tag: redirect:$LATEST_TAG"
|
||||
fi
|
||||
- echo "Build complete. Images registered on host Docker engine:"
|
||||
- docker images | grep redirect || true
|
||||
|
||||
@@ -34,4 +44,4 @@ trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
- cron
|
||||
|
||||
Reference in New Issue
Block a user