Update .woodpecker.yml #23

Open
trent wants to merge 58 commits from Warehouses into master
Showing only changes of commit 9a6f2040cf - Show all commits

View File

@@ -196,16 +196,27 @@ steps:
REAL_PDIR=$(cat /tmp/pdir.txt)
sed "s|%%PROJECTNAME%%|$REAL_PNAME|g; s|%%PROJECTDIR%%|$REAL_PDIR|g" "Dockerfile.temp" > "Dockerfile.final"
echo "=== Budowanie obrazu ==="
DOCKER_BUILDKIT=0 docker build \
--network=host \
-t "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}" \
-t "$(cat /tmp/tag.txt):latest" \
-f "Dockerfile.final" \
.
. || { echo "BUILD FAILED"; exit 1; }
docker push "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}"
docker push "$(cat /tmp/tag.txt):latest"
echo "=== Obraz zbudowany, sprawdzam ==="
docker images | grep "$(cat /tmp/tag.txt | sed 's|git.modwad.pl/||')" || echo "Obraz nie znaleziony w docker images"
echo "=== Pushing SHA tag ==="
docker push "$(cat /tmp/tag.txt):${CI_COMMIT_SHA}" || { echo "PUSH SHA FAILED"; exit 1; }
echo "=== Pushing latest tag ==="
docker push "$(cat /tmp/tag.txt):latest" || { echo "PUSH LATEST FAILED"; exit 1; }
echo "=== SUCCESS: $(cat /tmp/tag.txt) ==="
rm -f "Dockerfile.temp" "Dockerfile.final"
done
echo "=== WSZYSTKIE PROJEKTY ZAKONCZONE ==="
depends_on: [select-projects-for-container]