From 385e1ef79a41fec934624e82d85b762fd1ddd627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Sun, 4 Feb 2024 00:19:31 -0500 Subject: [PATCH 1/3] 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..2024128 --- /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} + - export TAG=$(openssl rand -hex 8) + - docker build --rm=true -f Dockerfile -t $TAG . + - docker tag $TAG $${DOCKERHUB_USERNAME}/$${APP}:latest + - docker push $${DOCKERHUB_USERNAME}/$${APP}:latest + secrets: [ dockerhub_username, dockerhub_password, app ] + 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 "$${APP}" -i docker.io/$${DOCKERHUB_USERNAME}/$${APP} + secrets: [ dockerhub_username, dockerhub_password, caprover_url, caprover_password, app] + volumes: + - /var/run/docker.sock:/var/run/docker.sock \ No newline at end of file From 326ecc1580a7f3e461ee3561617502b15df761e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Sun, 4 Feb 2024 00:22:15 -0500 Subject: [PATCH 2/3] ajout woodpecker --- .woodpecker.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 2024128..3899fc5 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -17,4 +17,4 @@ steps: - docker run --network=host caprover/cli-caprover:2.2.3 caprover deploy --caproverUrl "$${CAPROVER_URL}" --caproverPassword "$${CAPROVER_PASSWORD}" -a "$${APP}" -i docker.io/$${DOCKERHUB_USERNAME}/$${APP} secrets: [ dockerhub_username, dockerhub_password, caprover_url, caprover_password, app] volumes: - - /var/run/docker.sock:/var/run/docker.sock \ No newline at end of file + - /var/run/docker.sock:/var/run/docker.sock From 2997835f0106ef926566e7a56ad79a791c1d59ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Mon, 5 Feb 2024 17:16:07 -0500 Subject: [PATCH 3/3] ajout woodpecker --- .woodpecker.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 3899fc5..ac075bd 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -3,18 +3,17 @@ steps: image: plugins/docker commands: - docker login docker.io -u $${DOCKERHUB_USERNAME} -p $${DOCKERHUB_PASSWORD} - - export TAG=$(openssl rand -hex 8) - - docker build --rm=true -f Dockerfile -t $TAG . - - docker tag $TAG $${DOCKERHUB_USERNAME}/$${APP}:latest - - docker push $${DOCKERHUB_USERNAME}/$${APP}:latest - secrets: [ dockerhub_username, dockerhub_password, app ] + - docker build --rm=true -f Dockerfile -t $${CI_COMMIT_REF} . + - docker tag $${CI_COMMIT_REF} $${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 "$${APP}" -i docker.io/$${DOCKERHUB_USERNAME}/$${APP} - secrets: [ dockerhub_username, dockerhub_password, caprover_url, caprover_password, app] + - 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