|
|
@ -20,16 +20,15 @@ steps:
|
|
|
|
- name: shared
|
|
|
|
- name: shared
|
|
|
|
path: /tmp/shared
|
|
|
|
path: /tmp/shared
|
|
|
|
|
|
|
|
|
|
|
|
- name: serve
|
|
|
|
- name: export
|
|
|
|
image: python:3.7-alpine
|
|
|
|
image: python:3.7-alpine
|
|
|
|
environment:
|
|
|
|
environment:
|
|
|
|
SSH_KEY:
|
|
|
|
username:
|
|
|
|
from_secret: SSH_KEY
|
|
|
|
from_secret: username
|
|
|
|
|
|
|
|
password:
|
|
|
|
|
|
|
|
from_secret: password
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- apk add unzip wget make git curl openssh
|
|
|
|
- apk add unzip wget make git curl openssh
|
|
|
|
- mkdir /root/.ssh && echo "$SSH_KEY" > /root/.ssh/id_rsa && chmod 0600 /root/.ssh/id_rsa
|
|
|
|
|
|
|
|
- git config --global user.name "Drone CI"
|
|
|
|
|
|
|
|
- git config --global user.email "drone@omglinux.de"
|
|
|
|
|
|
|
|
- mkdir /tmp/content
|
|
|
|
- mkdir /tmp/content
|
|
|
|
- curl https://cloud.fdgl.rocks/index.php/s/wGLnSaTiL2rn5ae/download -o /tmp/content.zip
|
|
|
|
- curl https://cloud.fdgl.rocks/index.php/s/wGLnSaTiL2rn5ae/download -o /tmp/content.zip
|
|
|
|
- unzip /tmp/content.zip -d /tmp
|
|
|
|
- unzip /tmp/content.zip -d /tmp
|
|
|
@ -40,13 +39,26 @@ steps:
|
|
|
|
- source /tmp/shared/.venv/bin/activate
|
|
|
|
- source /tmp/shared/.venv/bin/activate
|
|
|
|
- nohup python3 app.py 2>&1 > /dev/null &
|
|
|
|
- nohup python3 app.py 2>&1 > /dev/null &
|
|
|
|
- sleep 3
|
|
|
|
- sleep 3
|
|
|
|
- ssh-keyscan -H git.omglinux.de -p 2222 >> ~/.ssh/known_hosts
|
|
|
|
- git clone https://git.omglinux.de/michael/fdgl-production.git /tmp/shared/target
|
|
|
|
- git clone ssh://git@git.omglinux.de:2222/michael/fdgl-production.git /tmp/shared/target
|
|
|
|
|
|
|
|
- cd /tmp/shared/target
|
|
|
|
- cd /tmp/shared/target
|
|
|
|
- wget -mpEk http://127.0.0.1:5000 2>&1 > /dev/null || true
|
|
|
|
- wget -mpEk http://127.0.0.1:5000 2>&1 > /dev/null || true
|
|
|
|
- git add -A
|
|
|
|
volumes:
|
|
|
|
- git commit -m "automatic commit $(date)"
|
|
|
|
- name: shared
|
|
|
|
- git push origin main
|
|
|
|
path: /tmp/shared
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: push
|
|
|
|
|
|
|
|
image: appleboy/drone-git-push
|
|
|
|
|
|
|
|
settings:
|
|
|
|
|
|
|
|
branch: main
|
|
|
|
|
|
|
|
remote: ssh://git@git.omglinux.de:2222/michael/fdgl-production.git
|
|
|
|
|
|
|
|
force: false
|
|
|
|
|
|
|
|
commit: true
|
|
|
|
|
|
|
|
commit_message: "Drone build ${DRONE_COMMIT_SHA:0:7}"
|
|
|
|
|
|
|
|
author_name: "Drone CI"
|
|
|
|
|
|
|
|
author_email: "drone@omglinux.de"
|
|
|
|
|
|
|
|
path: /tmp/shared/target
|
|
|
|
|
|
|
|
ssh_key:
|
|
|
|
|
|
|
|
from_secret: ssh_key
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- name: shared
|
|
|
|
- name: shared
|
|
|
|
path: /tmp/shared
|
|
|
|
path: /tmp/shared
|
|
|
|