From 364262f4bb8b8d055a97e5cffa169f9af3b2aa82 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 30 May 2023 00:28:49 +0200 Subject: [PATCH] Cleanup --- .woodpecker/.variants.yml | 44 +-------------------------------------- build.sh | 28 +++++++++++++++++++++---- 2 files changed, 25 insertions(+), 47 deletions(-) diff --git a/.woodpecker/.variants.yml b/.woodpecker/.variants.yml index e7c6c829..b23cb05e 100644 --- a/.woodpecker/.variants.yml +++ b/.woodpecker/.variants.yml @@ -13,7 +13,7 @@ clone: tags: true pipeline: - alpine-cli: + build: image: docker:cli secrets: [docker_username, docker_password] volumes: @@ -24,45 +24,3 @@ pipeline: event: - push - sid-cli: - image: woodpeckerci/plugin-docker-buildx - secrets: [docker_username, docker_password] - settings: - repo: danog/php - dockerfile: "8.2/sid/cli/Dockerfile" - platforms: linux/riscv64 - tag: 8.2 - cache_from: type=registry,ref=danog/php:8.2 - cache_to: type=inline - when: - event: - - push - - - alpine-fpm: - image: woodpeckerci/plugin-docker-buildx - secrets: [docker_username, docker_password] - settings: - repo: danog/php - dockerfile: "8.2/alpineedge/fpm/Dockerfile" - platforms: linux/riscv64 - tag: 8.2-fpm-alpine - cache_from: type=registry,ref=danog/php:8.2-fpm-alpine - cache_to: type=inline - when: - event: - - push - - sid-fpm: - image: woodpeckerci/plugin-docker-buildx - secrets: [docker_username, docker_password] - settings: - repo: danog/php - dockerfile: "8.2/sid/fpm/Dockerfile" - platforms: linux/riscv64 - tag: 8.2-fpm - cache_from: type=registry,ref=danog/php:8.2-fpm - cache_to: type=inline - when: - event: - - push diff --git a/build.sh b/build.sh index 86549c2e..02d2a910 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,28 @@ #!/bin/sh -e docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD" - -cd "8.2/alpineedge/cli/" docker buildx create --use --name wp --driver remote tcp://192.168.69.206:1234 -docker buildx build --platform linux/riscv64 . -t danog/php:8.2-alpine -docker push danog/php:8.2-alpine + +build() { + cd "$1" + docker buildx build --platform linux/riscv64 . -t danog/php:$2 --cache-from danog/php:$2 --cache-to type=inline + docker push danog/php:$2 + cd "$base" +} + + +cd 8.2 + +base=$PWD + +build alpineedge/cli/ 8.2-alpine +build alpineedge/fpm/ 8.2-fpm-alpine + +build sid/cli/ 8.2 +build sid/fpm/ 8.2-fpm + +docker tag danog/php:8.2 danog/php:8.2-debian +docker tag danog/php:8.2-fpm danog/php:8.2-fpm-debian + +docker push danog/php:8.2-debian +docker push danog/php:8.2-fpm-debian