ci: build with kaniko
All checks were successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/build/5 Pipeline was successful
ci/woodpecker/push/build/6 Pipeline was successful
ci/woodpecker/push/build/7 Pipeline was successful

This commit is contained in:
Simon Vieille 2023-12-26 17:34:01 +01:00
parent 35071e06b8
commit 61fc01f27d
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -10,15 +10,17 @@ matrix:
steps:
docker:
image: docker:dind
image: gcr.io/kaniko-project/executor:latest
secrets: [registry_user, registry_password, registry_docker_password]
commands:
- echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin gitnet.fr
- echo "$REGISTRY_DOCKER_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
- docker build -t "deblan/php:$PHP_VERSION" -f "./Dockerfile.php$PHP_VERSION" .
- docker tag "deblan/php:$PHP_VERSION" "gitnet.fr/deblan/php:$PHP_VERSION"
- docker push "gitnet.fr/deblan/php:$PHP_VERSION"
- docker push "deblan/php:$PHP_VERSION"
# - echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin gitnet.fr
# - echo "$REGISTRY_DOCKER_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
# - docker build -t "deblan/php:$PHP_VERSION" -f "./Dockerfile.php$PHP_VERSION" .
# - docker tag "deblan/php:$PHP_VERSION" "gitnet.fr/deblan/php:$PHP_VERSION"
# - docker push "gitnet.fr/deblan/php:$PHP_VERSION"
# - docker push "deblan/php:$PHP_VERSION"
- /kaniko/executor --no-push --context $CI_WORKSPACE --dockerfile "./Dockerfile.php$PHP_VERSION" --destination "gitnet.fr/deblan/php:$PHP_VERSION"
- /kaniko/executor --no-push --context $CI_WORKSPACE --dockerfile "./Dockerfile.php$PHP_VERSION" --destination "deblan/php:$PHP_VERSION"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when: