[CHORE] Adjust Actions For Deployment
All checks were successful
Deploy USW-MC / deploy-edge (push) Successful in 2m3s
All checks were successful
Deploy USW-MC / deploy-edge (push) Successful in 2m3s
This commit is contained in:
parent
8c7e41b21b
commit
6e9c71568d
8 changed files with 148 additions and 147 deletions
31
.forgejo/workflows/deploy-edge-proxy.yml
Normal file
31
.forgejo/workflows/deploy-edge-proxy.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# name: Deploy Edge Proxy
|
||||||
|
# run-name: ${{ gitea.actor }} Deploy Edge Proxy
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# branches: [ master ]
|
||||||
|
|
||||||
|
# env:
|
||||||
|
# GARDEN_DEPLOY_ACTION: minecluster-proxy
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# deploy-edge:
|
||||||
|
# steps:
|
||||||
|
# # Setup Oasis
|
||||||
|
# - name: Oasis Setup
|
||||||
|
# uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
||||||
|
# with:
|
||||||
|
# deploy-env: edge
|
||||||
|
# infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
||||||
|
# # Deploy to Edge Cluster
|
||||||
|
# - name: Deploy to Edge Cluster
|
||||||
|
# run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-edge
|
||||||
|
# working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
# # Alert via Discord
|
||||||
|
# - name: Discord Alert
|
||||||
|
# if: always()
|
||||||
|
# uses: https://gitea.dunemask.dev/elysium/elysium-actions@discord-status
|
||||||
|
# with:
|
||||||
|
# status: ${{ job.status }}
|
||||||
|
# channel: deployments
|
||||||
|
# header: DEPLOY EDGE
|
||||||
|
# additional-content: "Minecluster Proxy"
|
44
.forgejo/workflows/deploy-edge.yml
Normal file
44
.forgejo/workflows/deploy-edge.yml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
name: Deploy USW-MC
|
||||||
|
run-name: ${{ forgejo.actor }} Deploy USW-MC
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
GARDEN_DEPLOY_ACTION: minecluster
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-edge:
|
||||||
|
steps:
|
||||||
|
# Configure proper kubeconfig (Used when cluster does not match the edge environment)
|
||||||
|
# - name: Get usw-mc deployment kubeconfig
|
||||||
|
# uses: https://forgejo.dunemask.dev/elysium/elysium-actions@infisical-env
|
||||||
|
# with:
|
||||||
|
# infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
||||||
|
# infisical-project: ${{ vars.INFISICAL_DEPLOYMENTS_PROJECT_ID }}
|
||||||
|
# secret-envs: edge
|
||||||
|
# secret-paths: /kubernetes
|
||||||
|
# Setup Oasis
|
||||||
|
- name: Oasis Setup
|
||||||
|
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
||||||
|
with:
|
||||||
|
deploy-env: edge
|
||||||
|
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
||||||
|
infisical-project: ${{ vars.INFISICAL_DEPLOYMENTS_PROJECT_ID }}
|
||||||
|
extra-secret-paths: /dashboard
|
||||||
|
extra-secret-envs: edge
|
||||||
|
# Deploy to Edge
|
||||||
|
- name: Deploy to Edge env
|
||||||
|
run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-edge
|
||||||
|
working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
# env: # (Used when cluster does not match the edge environment)
|
||||||
|
# MCL_KUBECONFIG: ${{ env.KUBERNETES_CONFIG_USW_MC }}
|
||||||
|
# Alert via Discord
|
||||||
|
- name: Discord Alert
|
||||||
|
if: always()
|
||||||
|
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@discord-status
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
channel: deployments
|
||||||
|
header: DEPLOY MC
|
||||||
|
additional-content: "Minecluster Server Manager Deployment"
|
42
.forgejo/workflows/qa-api-tests.yml
Normal file
42
.forgejo/workflows/qa-api-tests.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# name: QA API Tests
|
||||||
|
# run-name: ${{ gitea.actor }} QA API Test
|
||||||
|
# on:
|
||||||
|
# pull_request:
|
||||||
|
# branches: [ master ]
|
||||||
|
|
||||||
|
# env:
|
||||||
|
# REPO_DIR: ${{ gitea.workspace }}/minecluster
|
||||||
|
# GARDEN_LINK_ACTION: build.minecluster-image
|
||||||
|
|
||||||
|
# jobs:
|
||||||
|
# qa-api-tests:
|
||||||
|
# steps:
|
||||||
|
# # Setup Oasis
|
||||||
|
# - name: Oasis Setup
|
||||||
|
# uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
||||||
|
# with:
|
||||||
|
# deploy-env: ci
|
||||||
|
# infisical-token: ${{ secrets.INFISICAL_ELYSIUM_CI_READ_TOKEN }}
|
||||||
|
# # Test Code
|
||||||
|
# - name: Checkout repository
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
# with:
|
||||||
|
# path: ${{ env.REPO_DIR }}
|
||||||
|
# # Garden link
|
||||||
|
# - name: Link Repo code to Garden
|
||||||
|
# run: garden link action $GARDEN_LINK_ACTION $REPO_DIR --env usw-ci --var cubit-projects=cairo,minecluster
|
||||||
|
# working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
# # Cubit CI Tests
|
||||||
|
# - name: Run Cubit tests in CI env
|
||||||
|
# run: garden workflow qa-api-tests --env usw-ci --var ci-ttl=25m
|
||||||
|
# working-directory: ${{ env.OASIS_WORKSPACE }}
|
||||||
|
# # Discord Alert
|
||||||
|
# - name: Discord Alert
|
||||||
|
# if: always()
|
||||||
|
# uses: https://gitea.dunemask.dev/elysium/elysium-actions@discord-status
|
||||||
|
# with:
|
||||||
|
# status: ${{ job.status }}
|
||||||
|
# channel: ci
|
||||||
|
# header: QA API Tests
|
||||||
|
# additional-content: "CI Namespace: `${{env.CI_NAMESPACE}}`"
|
||||||
|
|
31
.forgejo/workflows/s3-repo-backup.yml
Normal file
31
.forgejo/workflows/s3-repo-backup.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# name: S3 Repo Backup
|
||||||
|
# run-name: ${{ gitea.actor }} S3 Repo Backup
|
||||||
|
# on:
|
||||||
|
# push:
|
||||||
|
# branches: [ master ]
|
||||||
|
|
||||||
|
# env:
|
||||||
|
# S3_BACKUP_ENDPOINT: https://s3.dunemask.dev
|
||||||
|
# S3_BACKUP_KEY_ID: gitea-repo-backup
|
||||||
|
# S3_BACKUP_KEY: ${{ secrets.S3_REPO_BACKUP_KEY }}
|
||||||
|
# REPO_DIR: ${{ gitea.workspace }}/${{ gitea.respository }}
|
||||||
|
# jobs:
|
||||||
|
# s3-repo-backup:
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout repository
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
# with:
|
||||||
|
# path: ${{ env.REPO_DIR }}
|
||||||
|
# - name: S3 Backup
|
||||||
|
# uses: peter-evans/s3-backup@v1
|
||||||
|
# env:
|
||||||
|
# ACCESS_KEY_ID: ${{ env.S3_BACKUP_KEY_ID }}
|
||||||
|
# SECRET_ACCESS_KEY: ${{ env.S3_BACKUP_KEY }}
|
||||||
|
# MIRROR_SOURCE: ${{ env.REPO_DIR }}
|
||||||
|
# MIRROR_TARGET: backups/gitea-repositories/${{ gitea.repository }}
|
||||||
|
# STORAGE_SERVICE_URL: ${{env.S3_BACKUP_ENDPOINT}}
|
||||||
|
# with:
|
||||||
|
# args: --overwrite --remove
|
||||||
|
# - name: Status Alert
|
||||||
|
# if: always()
|
||||||
|
# run: echo "The Job ended with status ${{ job.status }}."
|
|
@ -1,31 +0,0 @@
|
||||||
name: Deploy Edge Proxy
|
|
||||||
run-name: ${{ gitea.actor }} Deploy Edge Proxy
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
GARDEN_DEPLOY_ACTION: minecluster-proxy
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-edge:
|
|
||||||
steps:
|
|
||||||
# Setup Oasis
|
|
||||||
- name: Oasis Setup
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
|
||||||
with:
|
|
||||||
deploy-env: edge
|
|
||||||
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
|
||||||
# Deploy to Edge Cluster
|
|
||||||
- name: Deploy to Edge Cluster
|
|
||||||
run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-edge
|
|
||||||
working-directory: ${{ env.OASIS_WORKSPACE }}
|
|
||||||
# Alert via Discord
|
|
||||||
- name: Discord Alert
|
|
||||||
if: always()
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@discord-status
|
|
||||||
with:
|
|
||||||
status: ${{ job.status }}
|
|
||||||
channel: deployments
|
|
||||||
header: DEPLOY EDGE
|
|
||||||
additional-content: "Minecluster Proxy"
|
|
|
@ -1,43 +0,0 @@
|
||||||
name: Deploy USW-MC
|
|
||||||
run-name: ${{ gitea.actor }} Deploy USW-MC
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
GARDEN_DEPLOY_ACTION: minecluster
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-edge:
|
|
||||||
steps:
|
|
||||||
# Configure proper kubeconfig
|
|
||||||
- name: Get usw-mc deployment kubeconfig
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env
|
|
||||||
with:
|
|
||||||
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
|
||||||
secret-envs: edge
|
|
||||||
secret-paths: /kubernetes
|
|
||||||
# Setup Oasis
|
|
||||||
- name: Oasis Setup
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
|
||||||
with:
|
|
||||||
deploy-env: edge
|
|
||||||
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_EDGE_READ_TOKEN }}
|
|
||||||
extra-secret-paths: /alexandria
|
|
||||||
extra-secret-envs: edge
|
|
||||||
kubeconfig: ${{ env.KUBERNETES_CONFIG_USW_MC }}
|
|
||||||
# Deploy to Edge
|
|
||||||
- name: Deploy to Edge env
|
|
||||||
run: garden deploy $GARDEN_DEPLOY_ACTION --force --force-build --env usw-mc
|
|
||||||
working-directory: ${{ env.OASIS_WORKSPACE }}
|
|
||||||
env:
|
|
||||||
MCL_KUBECONFIG: ${{ env.KUBERNETES_CONFIG_USW_MC }}
|
|
||||||
# Alert via Discord
|
|
||||||
- name: Discord Alert
|
|
||||||
if: always()
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@discord-status
|
|
||||||
with:
|
|
||||||
status: ${{ job.status }}
|
|
||||||
channel: deployments
|
|
||||||
header: DEPLOY MC
|
|
||||||
additional-content: "Minecluster Server Manager Deployment"
|
|
|
@ -1,42 +0,0 @@
|
||||||
name: QA API Tests
|
|
||||||
run-name: ${{ gitea.actor }} QA API Test
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
REPO_DIR: ${{ gitea.workspace }}/minecluster
|
|
||||||
GARDEN_LINK_ACTION: build.minecluster-image
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
qa-api-tests:
|
|
||||||
steps:
|
|
||||||
# Setup Oasis
|
|
||||||
- name: Oasis Setup
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@oasis-setup-auto
|
|
||||||
with:
|
|
||||||
deploy-env: ci
|
|
||||||
infisical-token: ${{ secrets.INFISICAL_ELYSIUM_CI_READ_TOKEN }}
|
|
||||||
# Test Code
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ${{ env.REPO_DIR }}
|
|
||||||
# Garden link
|
|
||||||
- name: Link Repo code to Garden
|
|
||||||
run: garden link action $GARDEN_LINK_ACTION $REPO_DIR --env usw-ci --var cubit-projects=cairo,minecluster
|
|
||||||
working-directory: ${{ env.OASIS_WORKSPACE }}
|
|
||||||
# Cubit CI Tests
|
|
||||||
- name: Run Cubit tests in CI env
|
|
||||||
run: garden workflow qa-api-tests --env usw-ci --var ci-ttl=25m
|
|
||||||
working-directory: ${{ env.OASIS_WORKSPACE }}
|
|
||||||
# Discord Alert
|
|
||||||
- name: Discord Alert
|
|
||||||
if: always()
|
|
||||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@discord-status
|
|
||||||
with:
|
|
||||||
status: ${{ job.status }}
|
|
||||||
channel: ci
|
|
||||||
header: QA API Tests
|
|
||||||
additional-content: "CI Namespace: `${{env.CI_NAMESPACE}}`"
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
name: S3 Repo Backup
|
|
||||||
run-name: ${{ gitea.actor }} S3 Repo Backup
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
S3_BACKUP_ENDPOINT: https://s3.dunemask.dev
|
|
||||||
S3_BACKUP_KEY_ID: gitea-repo-backup
|
|
||||||
S3_BACKUP_KEY: ${{ secrets.S3_REPO_BACKUP_KEY }}
|
|
||||||
REPO_DIR: ${{ gitea.workspace }}/${{ gitea.respository }}
|
|
||||||
jobs:
|
|
||||||
s3-repo-backup:
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ${{ env.REPO_DIR }}
|
|
||||||
- name: S3 Backup
|
|
||||||
uses: peter-evans/s3-backup@v1
|
|
||||||
env:
|
|
||||||
ACCESS_KEY_ID: ${{ env.S3_BACKUP_KEY_ID }}
|
|
||||||
SECRET_ACCESS_KEY: ${{ env.S3_BACKUP_KEY }}
|
|
||||||
MIRROR_SOURCE: ${{ env.REPO_DIR }}
|
|
||||||
MIRROR_TARGET: backups/gitea-repositories/${{ gitea.repository }}
|
|
||||||
STORAGE_SERVICE_URL: ${{env.S3_BACKUP_ENDPOINT}}
|
|
||||||
with:
|
|
||||||
args: --overwrite --remove
|
|
||||||
- name: Status Alert
|
|
||||||
if: always()
|
|
||||||
run: echo "The Job ended with status ${{ job.status }}."
|
|
Loading…
Add table
Add a link
Reference in a new issue