test-woodpecker #1

Merged
francois merged 34 commits from test-woodpecker into main 2024-02-19 00:26:48 +00:00
Showing only changes of commit 1e6b2b2959 - Show all commits

View file

@ -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
- /var/run/docker.sock:/var/run/docker.sock