Compare commits
31 Commits
d165ef0e20
...
TestBranch
Author | SHA1 | Date | |
---|---|---|---|
af00f3729d | |||
2f141ba9c1 | |||
3a32158272 | |||
612b1e078c | |||
5b0e7641b8 | |||
fd15ed45ee | |||
eb0a6d9483 | |||
4ead2aa92d | |||
28f45e37ee | |||
280a2d6c92 | |||
e8fd475820 | |||
58381805e9 | |||
ab47ee2e18 | |||
1d42c7f95c | |||
398db54e15 | |||
c6f62df2c2 | |||
3a5b246220 | |||
00e89bdc64 | |||
cc61dba1a8 | |||
ffed04c846 | |||
fd6520128e | |||
90dbbc1239 | |||
|
3c163b391c | ||
b380440f5a | |||
|
39ee09787c | ||
87e1749d49 | |||
64363a929c | |||
521b046940 | |||
e8b353b28d | |||
84bac2f1ef | |||
12255dad5f |
54
.drone.yml
54
.drone.yml
@@ -1,54 +0,0 @@
|
|||||||
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, merged
|
|
27
.gitea/workflows/DeployPR.yaml
Normal file
27
.gitea/workflows/DeployPR.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Deploy PR
|
||||||
|
run-name: ${{ gitea.actor }} is deploying a PR
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ opened, reopened ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Deploy PR:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.12.0'
|
||||||
|
- name: Install pip packages
|
||||||
|
run: pip install requests python-dotenv --quiet
|
||||||
|
- name: Run Deploy script
|
||||||
|
run: >
|
||||||
|
python 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=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||||
|
--DEPLOY_BRANCH=${GITHUB_HEAD_REF}
|
||||||
|
--DEPLOY_HOST=dvdemo.privatedns.org
|
27
.gitea/workflows/UndeployPR.yaml
Normal file
27
.gitea/workflows/UndeployPR.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Undeploy PR
|
||||||
|
run-name: ${{ gitea.actor }} is undeploying a PR
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ closed ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Deploy PR:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.12.0'
|
||||||
|
- name: Install pip packages
|
||||||
|
run: pip install requests python-dotenv --quiet
|
||||||
|
- name: Run Undeploy script
|
||||||
|
run: >
|
||||||
|
python 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=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
||||||
|
--DEPLOY_BRANCH=${GITHUB_HEAD_REF}
|
||||||
|
|
@@ -2,9 +2,11 @@ version: '3.4'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
http-echo:
|
http-echo:
|
||||||
image: mendhak/http-https-echo:latest
|
build:
|
||||||
|
content: ./
|
||||||
|
dockerfile: httpecho.Dockerfile
|
||||||
expose:
|
expose:
|
||||||
- 8081
|
- 8080
|
||||||
environment:
|
environment:
|
||||||
- VIRTUAL_PORT=8081
|
- VIRTUAL_PORT=8080
|
||||||
- VIRTUAL_HOST=${HOST}
|
- VIRTUAL_HOST=${HOST}
|
2
httpecho.Dockerfile
Normal file
2
httpecho.Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
FROM mendhak/http-https-echo:latest
|
||||||
|
RUN echo "Hello"
|
Reference in New Issue
Block a user