Compare commits
No commits in common. "3a5b246220fccdd6bff0259d1edebd438c1b30ca" and "64363a929cf25e8ff87126178fda7c1cdd4879ec" have entirely different histories.
3a5b246220
...
64363a929c
|
@ -0,0 +1,53 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: deploy
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Deploy to Portainer
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add envsubst curl python3
|
||||||
|
- python3 -m ensurepip
|
||||||
|
- pip3 install requests python-dotenv --quiet
|
||||||
|
- python3 deploy/portainer/deploy.py
|
||||||
|
--PORTAINER https://dvportainer.privatedns.org
|
||||||
|
--PORTAINER_API_KEY=ptr_RwxH2Cd+htdD2FoFiG46erT9beyvj9VoF3BrQPtDH3Q=
|
||||||
|
--PORTAINER_EP=CICD-runner
|
||||||
|
--GITEA_API_KEY=f449c74ec7f04e54fe1e481eae43492b34cea406
|
||||||
|
--DEPLOY_REPO_URL=${DRONE_REPO_LINK}
|
||||||
|
--DEPLOY_BRANCH=${DRONE_SOURCE_BRANCH}
|
||||||
|
--DEPLOY_HOST=dvdemo.privatedns.org
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
action:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: undeploy
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Undeploy from Portainer
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add envsubst curl python3
|
||||||
|
- python3 -m ensurepip
|
||||||
|
- pip3 install requests python-dotenv --quiet
|
||||||
|
- python3 deploy/portainer/undeploy.py
|
||||||
|
--PORTAINER https://dvportainer.privatedns.org
|
||||||
|
--PORTAINER_API_KEY=ptr_RwxH2Cd+htdD2FoFiG46erT9beyvj9VoF3BrQPtDH3Q=
|
||||||
|
--PORTAINER_EP=CICD-runner
|
||||||
|
--GITEA_API_KEY=f449c74ec7f04e54fe1e481eae43492b34cea406
|
||||||
|
--DEPLOY_REPO_URL=${DRONE_REPO_LINK}
|
||||||
|
--DEPLOY_BRANCH=${DRONE_COMMIT_BRANCH}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
action:
|
||||||
|
- closed
|
|
@ -1,25 +0,0 @@
|
||||||
name: Deploy PR
|
|
||||||
run-name: ${{ gitea.actor }} is deploying a PR
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [ opened, reopened ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Deploy PR:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
- name: Install pip packages
|
|
||||||
run: pip3 install requests python-dotenv --quiet
|
|
||||||
- name: Run Deploy script
|
|
||||||
run: >
|
|
||||||
python3 deploy/portainer/deploy.py
|
|
||||||
--PORTAINER https://dvportainer.privatedns.org
|
|
||||||
--PORTAINER_API_KEY=ptr_RwxH2Cd+htdD2FoFiG46erT9beyvj9VoF3BrQPtDH3Q=
|
|
||||||
--PORTAINER_EP=CICD-runner
|
|
||||||
--GITEA_API_KEY=f449c74ec7f04e54fe1e481eae43492b34cea406
|
|
||||||
--DEPLOY_REPO_URL=${DRONE_REPO_LINK}
|
|
||||||
--DEPLOY_BRANCH=${DRONE_SOURCE_BRANCH}
|
|
||||||
--DEPLOY_HOST=dvdemo.privatedns.org
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
name: Undeploy PR
|
|
||||||
run-name: ${{ gitea.actor }} is undeploying a PR
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [ closed ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Deploy PR:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
- name: Install pip packages
|
|
||||||
run: pip3 install requests python-dotenv --quiet
|
|
||||||
- name: Run Undeploy script
|
|
||||||
run: >
|
|
||||||
python3 deploy/portainer/undeploy.py
|
|
||||||
--PORTAINER https://dvportainer.privatedns.org
|
|
||||||
--PORTAINER_API_KEY=ptr_RwxH2Cd+htdD2FoFiG46erT9beyvj9VoF3BrQPtDH3Q=
|
|
||||||
--PORTAINER_EP=CICD-runner
|
|
||||||
--GITEA_API_KEY=f449c74ec7f04e54fe1e481eae43492b34cea406
|
|
||||||
--DEPLOY_REPO_URL=${DRONE_REPO_LINK}
|
|
||||||
--DEPLOY_BRANCH=${DRONE_SOURCE_BRANCH}
|
|
||||||
|
|
Loading…
Reference in New Issue