Merge pull request 'dev into staging' (#457) from dev into staging
Reviewed-on: #457
This commit is contained in:
commit
af348b85a4
@ -6,9 +6,17 @@ on:
|
|||||||
- dev
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
on-push-deploy_sh-edraft:
|
pre-build:
|
||||||
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
container: sh-edraft.de/act-runner:latest
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Shutdown stack
|
||||||
|
run: docker stack rm sdb_dev
|
||||||
|
|
||||||
|
build-bot:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup docker
|
- name: Setup docker
|
||||||
uses: https://github.com/papodaca/install-docker-action@main
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
@ -20,12 +28,58 @@ jobs:
|
|||||||
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
run: |
|
||||||
|
cd bot/docker
|
||||||
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev
|
||||||
|
|
||||||
- name: Prepare bot build
|
- name: Prepare bot build
|
||||||
run: |
|
run: |
|
||||||
cd bot
|
|
||||||
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
cd bot
|
||||||
cpl i
|
cpl i
|
||||||
|
|
||||||
|
- name: Build docker bot
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker image prune -f
|
||||||
|
cpl build
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Setup docker
|
||||||
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
|
- run: docker -v
|
||||||
|
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
run: |
|
||||||
|
cd bot/docker
|
||||||
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: https://github.com/actions/setup-node@v3
|
uses: https://github.com/actions/setup-node@v3
|
||||||
|
|
||||||
@ -35,29 +89,45 @@ jobs:
|
|||||||
npm install -g ts-node
|
npm install -g ts-node
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
- name: Shutdown stack
|
|
||||||
run: docker stack rm sdb_dev
|
|
||||||
|
|
||||||
- name: Build docker bot
|
|
||||||
run: |
|
|
||||||
cd bot
|
|
||||||
docker image prune -f
|
|
||||||
cpl build
|
|
||||||
docker build -t sh-edraft.de/sdb-bot:$(cpl gv)-dev .
|
|
||||||
|
|
||||||
- name: Build docker web
|
- name: Build docker web
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
cp src/favicon.dev.ico src/favicon.ico
|
cp src/favicon.dev.ico src/favicon.ico
|
||||||
npm run build
|
npm run build
|
||||||
docker build -t sh-edraft.de/sdb-web:$(npm run -s gv)-dev .
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: [ build-bot, build-web ]
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install cpl
|
||||||
|
run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
run: |
|
run: |
|
||||||
cd bot/docker
|
cd bot/docker
|
||||||
chmod +x ./set-docker-compose-image-version.sh
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev
|
||||||
|
|
||||||
- name: Deploy Stack to sh-edraft.de
|
- name: Deploy Stack to sh-edraft.de
|
||||||
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
||||||
|
@ -6,9 +6,17 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
on-push-deploy_sh-edraft:
|
pre-build:
|
||||||
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
container: sh-edraft.de/act-runner:latest
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Shutdown stack
|
||||||
|
run: docker stack rm sdb_prod
|
||||||
|
|
||||||
|
build-bot:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup docker
|
- name: Setup docker
|
||||||
uses: https://github.com/papodaca/install-docker-action@main
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
@ -22,10 +30,44 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare bot build
|
- name: Prepare bot build
|
||||||
run: |
|
run: |
|
||||||
cd bot
|
|
||||||
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
cd bot
|
||||||
cpl i
|
cpl i
|
||||||
|
|
||||||
|
- name: Build docker bot
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker image prune -f
|
||||||
|
cpl build
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Setup docker
|
||||||
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
|
- run: docker -v
|
||||||
|
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: https://github.com/actions/setup-node@v3
|
uses: https://github.com/actions/setup-node@v3
|
||||||
|
|
||||||
@ -35,28 +77,45 @@ jobs:
|
|||||||
npm install -g ts-node
|
npm install -g ts-node
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
- name: Shutdown stack
|
|
||||||
run: docker stack rm sdb_prod
|
|
||||||
|
|
||||||
- name: Build docker bot
|
|
||||||
run: |
|
|
||||||
cd bot
|
|
||||||
docker image prune -f
|
|
||||||
cpl build
|
|
||||||
docker build -t sh-edraft.de/sdb-bot:$(cpl gv) .
|
|
||||||
|
|
||||||
- name: Build docker web
|
- name: Build docker web
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
|
cp src/favicon.ico src/favicon.ico
|
||||||
npm run build
|
npm run build
|
||||||
docker build -t sh-edraft.de/sdb-web:$(npm run -s gv) .
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv) .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: [ build-bot, build-web ]
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install cpl
|
||||||
|
run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
run: |
|
run: |
|
||||||
cd bot/docker
|
cd bot/docker
|
||||||
chmod +x ./set-docker-compose-image-version.sh
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)
|
||||||
|
|
||||||
- name: Deploy Stack to sh-edraft.de
|
- name: Deploy Stack to sh-edraft.de
|
||||||
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
||||||
|
@ -6,9 +6,17 @@ on:
|
|||||||
- staging
|
- staging
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
on-push-deploy_sh-edraft:
|
pre-build:
|
||||||
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
container: sh-edraft.de/act-runner:latest
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Shutdown stack
|
||||||
|
run: docker stack rm sdb_test
|
||||||
|
|
||||||
|
build-bot:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup docker
|
- name: Setup docker
|
||||||
uses: https://github.com/papodaca/install-docker-action@main
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
@ -20,12 +28,58 @@ jobs:
|
|||||||
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
run: |
|
||||||
|
cd bot/docker
|
||||||
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging
|
||||||
|
|
||||||
- name: Prepare bot build
|
- name: Prepare bot build
|
||||||
run: |
|
run: |
|
||||||
cd bot
|
|
||||||
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
cd bot
|
||||||
cpl i
|
cpl i
|
||||||
|
|
||||||
|
- name: Build docker bot
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker image prune -f
|
||||||
|
cpl build
|
||||||
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-staging .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-staging
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
needs: pre-build
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Setup docker
|
||||||
|
uses: https://github.com/papodaca/install-docker-action@main
|
||||||
|
- run: docker -v
|
||||||
|
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set version
|
||||||
|
run: |
|
||||||
|
cd bot/docker
|
||||||
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging
|
||||||
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: https://github.com/actions/setup-node@v3
|
uses: https://github.com/actions/setup-node@v3
|
||||||
|
|
||||||
@ -35,29 +89,45 @@ jobs:
|
|||||||
npm install -g ts-node
|
npm install -g ts-node
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
- name: Shutdown stack
|
|
||||||
run: docker stack rm sdb_staging
|
|
||||||
|
|
||||||
- name: Build docker bot
|
|
||||||
run: |
|
|
||||||
cd bot
|
|
||||||
docker image prune -f
|
|
||||||
cpl build
|
|
||||||
docker build -t sh-edraft.de/sdb-bot:$(cpl gv)-staging .
|
|
||||||
|
|
||||||
- name: Build docker web
|
- name: Build docker web
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
cp src/favicon.staging.ico src/favicon.ico
|
cp src/favicon.staging.ico src/favicon.ico
|
||||||
npm run build
|
npm run build
|
||||||
docker build -t sh-edraft.de/sdb-web:$(npm run -s gv)-staging .
|
docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-staging .
|
||||||
|
|
||||||
|
- name: Login to registry git.sh-edraft.de
|
||||||
|
uses: https://github.com/docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.sh-edraft.de
|
||||||
|
username: ${{ secrets.CI_USERNAME }}
|
||||||
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push image
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-staging
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: [ build-bot, build-web ]
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
||||||
|
steps:
|
||||||
|
- name: Clone Repository
|
||||||
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install cpl
|
||||||
|
run: python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
|
||||||
- name: Set version
|
- name: Set version
|
||||||
run: |
|
run: |
|
||||||
cd bot/docker
|
cd bot/docker
|
||||||
chmod +x ./set-docker-compose-image-version.sh
|
chmod +x ./set-docker-compose-image-version.sh
|
||||||
./set-docker-compose-image-version.sh sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging
|
./set-docker-compose-image-version.sh git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging
|
||||||
|
|
||||||
- name: Deploy Stack to sh-edraft.de
|
- name: Deploy Stack to sh-edraft.de
|
||||||
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
||||||
@ -66,6 +136,6 @@ jobs:
|
|||||||
portainer-username: "gitea_job"
|
portainer-username: "gitea_job"
|
||||||
portainer-password: "${{ secrets.docker_job }}"
|
portainer-password: "${{ secrets.docker_job }}"
|
||||||
portainer-endpoint: 2
|
portainer-endpoint: 2
|
||||||
name: sdb_staging
|
name: sdb_test
|
||||||
file: bot/docker/docker-compose.staging.yml
|
file: bot/docker/docker-compose.staging.yml
|
||||||
variables: '{}'
|
variables: '{}'
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit abd17085309242a2aa0b415a9a14d5390163dfc2
|
Subproject commit 36ed43055df2979b5c4c486a161b1754803915cc
|
Loading…
Reference in New Issue
Block a user