From af9c55e4b16c4f540e62853e10549a0946458faf Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 20:59:31 +0100 Subject: [PATCH 01/10] Updated dev action --- .gitea/workflows/deploy_dev.yaml | 87 +++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 97b6c4d1..4a2ede6b 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -6,9 +6,17 @@ on: - dev jobs: - on-push-deploy_sh-edraft: + pre-build: 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: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,56 @@ jobs: 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 sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli 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: 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 sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-dev sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,30 +87,29 @@ jobs: npm install -g ts-node 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 run: | cd web docker image prune -f cp src/favicon.dev.ico src/favicon.ico 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: Set version - run: | - cd bot/docker - 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 + - 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: docker build -t 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: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: From d4f4f39522fed577cd64ff7432f1753b04b3074d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:22:00 +0100 Subject: [PATCH 02/10] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 4a2ede6b..0b9aaaf1 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -103,7 +103,7 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker build -t git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev + run: docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev deploy: needs: [ build-bot, build-web ] From 7e3975f4be03b9ee4a24c342ae8ab60e9378a9c6 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:28:15 +0100 Subject: [PATCH 03/10] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 0b9aaaf1..aa826338 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -55,7 +55,9 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev + run: | + cd bot + docker push git.sh-edraft.de/sh-edraft.de/sdb-bot:$(cpl gv)-dev build-web: needs: pre-build @@ -103,7 +105,9 @@ jobs: password: ${{ secrets.CI_ACCESS_TOKEN }} - name: Push image - run: docker push git.sh-edraft.de/sh-edraft.de/sdb-web:$(npm run -s gv)-dev + 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 ] From 711e1848955e8decc4144c7b950e9c9d18bc4759 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:34:21 +0100 Subject: [PATCH 04/10] Fixed dev action --- .gitea/workflows/deploy_dev.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index aa826338..1b36ccab 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -114,6 +114,12 @@ jobs: 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: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: From 3f13f65932ac869ccb9f554fe16ff7bfc6533956 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:43:34 +0100 Subject: [PATCH 05/10] Updated other env actions --- .gitea/workflows/deploy_prod.yaml | 96 ++++++++++++++++++++++----- .gitea/workflows/deploy_staging.yaml | 97 ++++++++++++++++++++++------ 2 files changed, 158 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index 1a4fb6dd..9e220db2 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -6,9 +6,17 @@ on: - master jobs: - on-push-deploy_sh-edraft: + pre-build: 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: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,58 @@ jobs: 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 sh-edraft.de/sdb-bot:$(cd ../; cpl gv) sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli 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: Set version + run: | + cd bot/docker + 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;) + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,28 +89,36 @@ jobs: npm install -g ts-node 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 run: | cd web docker image prune -f + cp src/favicon.ico src/favicon.ico 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: Set version + - 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 - 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;) + 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: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index f8bbd17a..b2f972d5 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -6,9 +6,17 @@ on: - staging jobs: - on-push-deploy_sh-edraft: + pre-build: 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: - name: Setup docker uses: https://github.com/papodaca/install-docker-action@main @@ -20,12 +28,58 @@ jobs: 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 sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + - name: Prepare bot build run: | cd bot python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli 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 sh-edraft.de/sdb-bot:$(cd ../; cpl gv)-staging sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging + - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -35,29 +89,36 @@ jobs: npm install -g ts-node 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 run: | cd web docker image prune -f cp src/favicon.staging.ico src/favicon.ico 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: Set version + - 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 - 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 + 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: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 @@ -66,6 +127,6 @@ jobs: portainer-username: "gitea_job" portainer-password: "${{ secrets.docker_job }}" portainer-endpoint: 2 - name: sdb_staging + name: sdb_test file: bot/docker/docker-compose.staging.yml variables: '{}' From 20bdb6bd982806e489bb0f0500d4f8407a3da15d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:46:01 +0100 Subject: [PATCH 06/10] Updated compose files --- bot/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/docker b/bot/docker index abd17085..0d438a9a 160000 --- a/bot/docker +++ b/bot/docker @@ -1 +1 @@ -Subproject commit abd17085309242a2aa0b415a9a14d5390163dfc2 +Subproject commit 0d438a9a69b29c617e7d1568fb01b5a5ef18e324 From b6a1172cc188b9d5e635b9edde273e3923d31db2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 21:51:47 +0100 Subject: [PATCH 07/10] Fixed actions --- bot/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/docker b/bot/docker index 0d438a9a..36ed4305 160000 --- a/bot/docker +++ b/bot/docker @@ -1 +1 @@ -Subproject commit 0d438a9a69b29c617e7d1568fb01b5a5ef18e324 +Subproject commit 36ed43055df2979b5c4c486a161b1754803915cc From 416353269610611525cf7be4515352ca1b501086 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:02:57 +0100 Subject: [PATCH 08/10] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 11 ++++++++--- .gitea/workflows/deploy_prod.yaml | 11 ++++++++--- .gitea/workflows/deploy_staging.yaml | 11 ++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 1b36ccab..7f6e13e3 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -28,16 +28,18 @@ jobs: 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 run: | cd bot/docker 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: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: 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 run: | cd bot/docker 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: Setup node uses: https://github.com/actions/setup-node@v3 diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index 9e220db2..c900a7d4 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -28,16 +28,18 @@ jobs: 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 run: | cd bot/docker 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: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: 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 run: | cd bot/docker 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: Setup node uses: https://github.com/actions/setup-node@v3 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index b2f972d5..4a01b239 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -28,16 +28,18 @@ jobs: 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 run: | cd bot/docker 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: Prepare bot build run: | cd bot - python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cpl i - name: Build docker bot @@ -74,11 +76,14 @@ jobs: 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 run: | cd bot/docker 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: Setup node uses: https://github.com/actions/setup-node@v3 From 013f953a7ff76a5925d64a17daf0f51234e781d9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:10:04 +0100 Subject: [PATCH 09/10] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 16 ++++++++++------ .gitea/workflows/deploy_prod.yaml | 28 ++++++++++------------------ .gitea/workflows/deploy_staging.yaml | 16 ++++++++++------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 7f6e13e3..1466204b 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -28,9 +28,6 @@ jobs: 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 run: | cd bot/docker @@ -39,6 +36,7 @@ jobs: - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,9 +74,6 @@ jobs: 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 run: | cd bot/docker @@ -125,6 +120,15 @@ jobs: 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 + 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) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: diff --git a/.gitea/workflows/deploy_prod.yaml b/.gitea/workflows/deploy_prod.yaml index c900a7d4..09566db7 100644 --- a/.gitea/workflows/deploy_prod.yaml +++ b/.gitea/workflows/deploy_prod.yaml @@ -28,17 +28,9 @@ jobs: 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 - 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) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,15 +68,6 @@ jobs: 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 - 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) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) - - name: Setup node uses: https://github.com/actions/setup-node@v3 @@ -125,6 +108,15 @@ jobs: 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 + 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) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 4a01b239..98514415 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -28,9 +28,6 @@ jobs: 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 run: | cd bot/docker @@ -39,6 +36,7 @@ jobs: - name: Prepare bot build run: | + python3.10 -m pip install --extra-index-url https://pip.sh-edraft.de cpl-cli cd bot cpl i @@ -76,9 +74,6 @@ jobs: 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 run: | cd bot/docker @@ -125,6 +120,15 @@ jobs: 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 + 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) git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;) + - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 with: From 7ed621a25b21851da35c9571f5bec8b571a32f48 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 9 Dec 2023 22:17:56 +0100 Subject: [PATCH 10/10] Fixed actions --- .gitea/workflows/deploy_dev.yaml | 2 +- .gitea/workflows/deploy_staging.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy_dev.yaml b/.gitea/workflows/deploy_dev.yaml index 1466204b..1fb38c5a 100644 --- a/.gitea/workflows/deploy_dev.yaml +++ b/.gitea/workflows/deploy_dev.yaml @@ -127,7 +127,7 @@ jobs: 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) git.sh-edraft.de/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)-dev git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-dev - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1 diff --git a/.gitea/workflows/deploy_staging.yaml b/.gitea/workflows/deploy_staging.yaml index 98514415..007656f0 100644 --- a/.gitea/workflows/deploy_staging.yaml +++ b/.gitea/workflows/deploy_staging.yaml @@ -127,7 +127,7 @@ jobs: 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) git.sh-edraft.de/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)-staging git.sh-edraft.de/sh-edraft.de/sdb-web:$(cd ../../web; npm run -s gv;)-staging - name: Deploy Stack to sh-edraft.de uses: https://github.com/kgierke/portainer-stack-deployment@v1