From f6968eb6e609049e621645e02e5d3d76d06abc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Mon, 5 Feb 2024 16:36:14 -0500 Subject: [PATCH] ajout woodpecker --- .woodpecker.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .woodpecker.yaml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..22b68c3 --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,20 @@ +steps: + - name: docker + image: plugins/docker + commands: + - docker login docker.io -u $${DOCKERHUB_USERNAME} -p $${DOCKERHUB_PASSWORD} + - docker build --rm=true -f Dockerfile -t $${CI_COMMIT_TAG} . + - docker push $${DOCKERHUB_USERNAME}/$${CI_REPO_NAME}:$${CI_COMMIT_TAG} + - docker tag $${CI_COMMIT_TAG} $${DOCKERHUB_USERNAME}/$${CI_REPO_NAME}:latest + - docker push $${DOCKERHUB_USERNAME}/$${CI_REPO_NAME}:latest + secrets: [ dockerhub_username, dockerhub_password ] + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - name: caprover + image: plugins/docker + commands: + - docker login docker.io -u $${DOCKERHUB_USERNAME} -p $${DOCKERHUB_PASSWORD} + - docker run --network=host caprover/cli-caprover:2.2.3 caprover deploy --caproverUrl "$${CAPROVER_URL}" --caproverPassword "$${CAPROVER_PASSWORD}" -a "$${CI_REPO_NAME}" -i docker.io/$${DOCKERHUB_USERNAME}/$${CI_REPO_NAME} + secrets: [ dockerhub_username, dockerhub_password, caprover_url, caprover_password ] + volumes: + - /var/run/docker.sock:/var/run/docker.sock