Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
timeout-minutes: 10
outputs:
VERSION: ${{ steps.version.outputs.VERSION }}
DATE_TAG: ${{ steps.version.outputs.DATE_TAG }}
steps:
- name: Define version
id: version
Expand All @@ -23,6 +24,7 @@ jobs:
export COMMIT_SHA_SHORT=${COMMIT_SHA:0:8}
export REF_NAME=${{ github.ref_name }}
export REF_SLUG=${REF_NAME//\//_}
echo "DATE_TAG=$(date -u +'%Y%m%d-%H%M%S')-${COMMIT_SHA_SHORT}" >> ${GITHUB_OUTPUT}
echo "short sha: ${COMMIT_SHA_SHORT} slug: ${REF_SLUG}"
if [[ ${REF_SLUG} == "master" ]]
then
Expand Down Expand Up @@ -57,6 +59,7 @@ jobs:
timeout-minutes: 10
env:
VERSION: ${{ needs.set-variables.outputs.VERSION }}
DATE_TAG: ${{ needs.set-variables.outputs.DATE_TAG }}
IMAGE_NAME: "docker.io/paritytech/substrate-tip-bot"
steps:
- name: Check out the repo
Expand All @@ -70,3 +73,4 @@ jobs:
push: false
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:${{ env.DATE_TAG }}
51 changes: 6 additions & 45 deletions .github/workflows/publish-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ jobs:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.version.outputs.VERSION }}
DATE_TAG: ${{ steps.version.outputs.DATE_TAG }}
steps:
- name: Define version
id: version
run: |
export COMMIT_SHA=${{ github.sha }}
export COMMIT_SHA_SHORT=${COMMIT_SHA:0:8}
export REF_NAME=${{ github.ref_name }}
echo "DATE_TAG=$(date -u +'%Y%m%d-%H%M%S')-${COMMIT_SHA_SHORT}" >> ${GITHUB_OUTPUT}
export REF_SLUG=${REF_NAME//\//_}
echo "short sha: ${COMMIT_SHA_SHORT} slug: ${REF_SLUG}"
if [[ ${REF_SLUG} == "master" ]]
Expand All @@ -51,6 +53,8 @@ jobs:
needs: [set-variables]
env:
VERSION: ${{ needs.set-variables.outputs.VERSION }}
DATE_TAG: ${{ needs.set-variables.outputs.DATE_TAG }}
IMAGE_NAME: "docker.io/paritytech/substrate-tip-bot"
steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand All @@ -67,48 +71,5 @@ jobs:
file: ./Dockerfile
push: true
tags: |
docker.io/paritytech/substrate-tip-bot:${{ env.VERSION }}

deploy-stg:
name: Deploy Staging
runs-on: ubuntu-latest
needs: [set-variables, build_push_docker]
environment: parity-stg
env:
VERSION: ${{ needs.set-variables.outputs.VERSION }}
ARGOCD_SERVER: "argocd-stg.teleport.parity.io"
steps:
- name: Deploy to ArgoCD
uses: paritytech/argocd-deployment-action@main
with:
environment: "parity-stg"
tag: "${{ env.VERSION }}"
app_name: "${{ env.APP }}"
app_packages: "common"
argocd_server: ${{ env.ARGOCD_SERVER }}
teleport_token: "substrate-tip"
teleport_app_name: "argocd-stg"
argocd_auth_token: ${{ secrets.ARGOCD_AUTH_TOKEN }}

deploy-prod:
name: Deploy Production
runs-on: ubuntu-latest
needs: [set-variables, deploy-stg]
# deploy only on tags
if: startsWith(github.ref, 'refs/tags/v')
environment: parity-prod
env:
VERSION: ${{ needs.set-variables.outputs.VERSION }}
ARGOCD_SERVER: "argocd-prod.teleport.parity.io"
steps:
- name: Deploy to ArgoCD
uses: paritytech/argocd-deployment-action@main
with:
environment: "parity-prod"
tag: "${{ env.VERSION }}"
app_name: "${{ env.APP }}"
app_packages: "common"
argocd_server: ${{ env.ARGOCD_SERVER }}
teleport_token: "substrate-tip"
teleport_app_name: "argocd-prod"
argocd_auth_token: ${{ secrets.ARGOCD_AUTH_TOKEN }}
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:${{ env.DATE_TAG }}
10 changes: 0 additions & 10 deletions helm/Chart.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions helm/values-parity-prod.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions helm/values-parity-stg.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions helm/values.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions manifest-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
images:
substrate-tip-bot:
env:
APP_HOST: "https://substrate-tip-bot.parity-prod.parity.io"
APPROVERS_GH_ORG: "paritytech"
APPROVERS_GH_TEAM: "tip-bot-approvers"
POLKASSEMBLY_ENDPOINT: "https://api.polkassembly.io/api/v1/"
MATRIX_SERVER_URL: "https://m.parity.io"
MATRIX_ROOM_ID: "!tQFMxBymnjGQYNwlzM:parity.io" # ENG: Engineering Automation -> tip-bot
# WEBHOOK_SECRET is used internally by probot: https://probot.github.io/docs/configuration/
WEBHOOK_SECRET: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#WEBHOOK_SECRET
PRIVATE_KEY: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#PRIVATE_KEY
ACCOUNT_SEED: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#ACCOUNT_SEED
APP_ID: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#APP_ID
MATRIX_ACCESS_TOKEN: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#MATRIX_ACCESS_TOKEN
15 changes: 15 additions & 0 deletions manifest-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
images:
substrate-tip-bot:
env:
APP_HOST: "https://substrate-tip-bot.parity-stg.parity.io"
APPROVERS_GH_ORG: "paritytech-stg"
APPROVERS_GH_TEAM: "tip-bot-approvers"
POLKASSEMBLY_ENDPOINT: "https://test.polkassembly.io/api/v1/"
MATRIX_SERVER_URL: "https://m.parity.io"
MATRIX_ROOM_ID: "!KiTmXyGkdiLNzrzMgj:parity.io" # ENG: Engineering Automation -> Bot Test Farm
# WEBHOOK_SECRET is used internally by probot: https://probot.github.io/docs/configuration/
WEBHOOK_SECRET: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#WEBHOOK_SECRET
PRIVATE_KEY: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#PRIVATE_KEY
ACCOUNT_SEED: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#ACCOUNT_SEED
APP_ID: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#APP_ID
MATRIX_ACCESS_TOKEN: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#MATRIX_ACCESS_TOKEN
7 changes: 7 additions & 0 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
images:
substrate-tip-bot:
dockerfile: ./Dockerfile
context: .
port: 3000
http:
path: /
Loading