Added dev env
This commit is contained in:
parent
467050d87e
commit
0a04ad74d8
@ -42,19 +42,21 @@ jobs:
|
|||||||
npm i
|
npm i
|
||||||
|
|
||||||
- name: Shutdown stack
|
- name: Shutdown stack
|
||||||
run: docker stack rm sdb_staging
|
run: docker stack rm sdb_dev
|
||||||
|
|
||||||
- name: Build docker bot
|
- name: Build docker bot
|
||||||
run: |
|
run: |
|
||||||
cd bot
|
cd bot
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
cpl docker-build
|
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
|
||||||
npm run docker-build
|
ng build
|
||||||
|
docker build -t sh-edraft.de/sdb-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
|
||||||
@ -63,6 +65,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_dev
|
||||||
file: bot/docker/docker-compose.staging.yml
|
file: bot/docker/docker-compose.dev.yml
|
||||||
variables: '{}'
|
variables: '{}'
|
||||||
|
@ -48,13 +48,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd bot
|
cd bot
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
cpl docker-build
|
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
|
||||||
npm run docker-build
|
ng build
|
||||||
|
docker build -t sh-edraft.de/sdb-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
|
||||||
|
70
.gitea/workflows/deploy_staging.yaml
Normal file
70
.gitea/workflows/deploy_staging.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
name: Deploy staging on push
|
||||||
|
run-name: Deploy staging on push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- staging
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
on-push-deploy_sh-edraft:
|
||||||
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Setup Python 3.10
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.10.12"
|
||||||
|
- run: python -v
|
||||||
|
|
||||||
|
- 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: Prepare bot build
|
||||||
|
run: |
|
||||||
|
cd bot
|
||||||
|
pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
||||||
|
cpl i
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: https://github.com/actions/setup-node@v3
|
||||||
|
|
||||||
|
- name: Prepare web build
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
npm install -g ts-node
|
||||||
|
npm i
|
||||||
|
|
||||||
|
- 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
|
||||||
|
ng build
|
||||||
|
docker build -t sh-edraft.de/sdb-web:$(npm run -s gv)-staging .
|
||||||
|
|
||||||
|
- name: Deploy Stack to sh-edraft.de
|
||||||
|
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
||||||
|
with:
|
||||||
|
portainer-url: "https://docker.sh-edraft.de"
|
||||||
|
portainer-username: "gitea_job"
|
||||||
|
portainer-password: "${{ secrets.docker_job }}"
|
||||||
|
portainer-endpoint: 2
|
||||||
|
name: sdb_staging
|
||||||
|
file: bot/docker/docker-compose.staging.yml
|
||||||
|
variables: '{}'
|
@ -1 +1 @@
|
|||||||
Subproject commit 91461d3ce30d3c61c24a143fadd975a2dddb593a
|
Subproject commit 777c23ac5fd1f2128980cc846f8ab46050b334cc
|
50
bot/src/bot_graphql/graphql/scheduledEvent.gql
Normal file
50
bot/src/bot_graphql/graphql/scheduledEvent.gql
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
type ShortRoleName implements TableWithHistoryQuery {
|
||||||
|
id: ID
|
||||||
|
shortName: String
|
||||||
|
roleId: String
|
||||||
|
roleName: String
|
||||||
|
position: String
|
||||||
|
|
||||||
|
server: Server
|
||||||
|
|
||||||
|
createdAt: String
|
||||||
|
modifiedAt: String
|
||||||
|
|
||||||
|
history: [ShortRoleNameHistory]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ShortRoleNameHistory implements HistoryTableQuery {
|
||||||
|
id: ID
|
||||||
|
shortName: String
|
||||||
|
roleId: String
|
||||||
|
position: String
|
||||||
|
|
||||||
|
server: ID
|
||||||
|
|
||||||
|
deleted: Boolean
|
||||||
|
dateFrom: String
|
||||||
|
dateTo: String
|
||||||
|
}
|
||||||
|
|
||||||
|
input ShortRoleNameFilter {
|
||||||
|
id: ID
|
||||||
|
shortName: String
|
||||||
|
roleId: String
|
||||||
|
roleName: String
|
||||||
|
position: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type ShortRoleNameMutation {
|
||||||
|
createShortRoleName(input: ShortRoleNameInput!): ShortRoleName
|
||||||
|
updateShortRoleName(input: ShortRoleNameInput!): ShortRoleName
|
||||||
|
deleteShortRoleName(id: ID): ShortRoleName
|
||||||
|
}
|
||||||
|
|
||||||
|
input ShortRoleNameInput {
|
||||||
|
id: ID
|
||||||
|
shortName: String
|
||||||
|
roleId: String
|
||||||
|
roleName: String
|
||||||
|
position: String
|
||||||
|
serverId: ID
|
||||||
|
}
|
@ -10,6 +10,7 @@
|
|||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
|
"gv": "echo $npm_package_version",
|
||||||
"predocker-build": "npm run update-version",
|
"predocker-build": "npm run update-version",
|
||||||
"docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .",
|
"docker-build": "export VERSION=$npm_package_version; ng build; docker build -t sh-edraft.de/sdb-web:$VERSION .",
|
||||||
"docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .",
|
"docker-build-dev": "export VERSION=$npm_package_version; ng build --configuration development; docker build -t sh-edraft.de/sdb-web:$VERSION .",
|
||||||
@ -52,4 +53,4 @@
|
|||||||
"tslib": "^2.4.1",
|
"tslib": "^2.4.1",
|
||||||
"typescript": "~4.9.5"
|
"typescript": "~4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user