-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github actions enhancements - streamlining workflows, workflow deploy automation, configuration refactoring, and bug Fixes #547
Closed
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
063854d
[#436] Implement a generic target to create a directory structure for…
placek fe3b9ed
[#436] Refactor the `prepare-nginx-config` phony target
placek ce340bd
[#436] Refactor the prepare-loki-config target
placek bb26750
[#436] Refactor prepare-promtail-config target
placek 56f8424
[#436] Refactor the `prepare-prometheus-config` target
placek a5f48dc
[#436] Refactor `prepare-backend-config` target
placek e721856
[#436] Refactor target configuration in `config.mk` to include `govto…
placek e9c6f1f
[#436] Refactor deployment makefiles to use file targets instead of p…
placek 54e98b0
[#436] Refactor prepare-dbsync-secrets target
placek 56799b4
[#436] Refactor generate-docker-compose-file target
placek c48917c
[#436] Refactor backend-config generation to use a template file targ…
placek 88efcc4
[#436] Remove phony Cardano config targets with actual file targets
placek 8b6c111
[#436] Refactor deployment makefiles to use file targets instead of p…
placek 3b193e3
[#436] Change explicit file targets to a more generic target
placek 6ac45d4
[#436] Refactor grafana provisioning target
placek 3edc22f
[#436] Refactor usage of `directories` variable for improved structuring
placek 93e9c69
[#484] Add GitHub Action workflow to automate deployment to the test …
placek 4e2db9e
[#484] Add GitHub Action workflow to automate deployment to the stagi…
placek c457395
[#484] Add GitHub Action workflow to automate deployment to the beta …
placek 3a8c191
[#484] Add manually triggered workflow for resyncing the Cardano stat…
placek 784b1a3
[#436] Refactor configuration output list
placek 27c1f35
[#436] Remove the invalid phony statement
placek 4bf7569
[#436] Move the upload target to the top to expose it more
placek 97ad6c0
Merge pull request #470 from IntersectMBO/chore/436-refactor-deployme…
placek 89f6298
[#444] Refactor maintenance mode workflow
placek b647323
Merge pull request #486 from IntersectMBO/chore/444-simplifying-toggl…
placek 43b24a7
[#484] Restrict manual deployment to the dev server only
placek efd1556
[#501] fix sql error
jankun4 b4d5557
[#503] Parametrize the configuration files for PostgreSQL with ENVs
placek 223679b
[#503] Update Cardano DB Sync version to 4.1.0
placek 8a98945
Merge pull request #485 from IntersectMBO/feat/484-implement-github-a…
placek 59adf03
[#457] Enable skipping Basic Auth for connections from VPN
placek dc2df5f
[#457] Add VPN addresses as environment variables for Basic Auth bypass
placek 6eb66d1
Merge pull request #477 from IntersectMBO/feat/457-enable-skip-basic-…
placek d472d90
[#507] chore: add frontend test github workflow
MSzalowski 4cda470
[#507] chore: change file name
MSzalowski ffd1129
Merge pull request #508 from IntersectMBO/feat/507/add-frontend-packa…
MSzalowski 8e2a082
Merge pull request #504 from IntersectMBO/chore/503-update-cardano-db…
placek 28ef369
[#512] chore: add type checking & lint workflow to github actions
MSzalowski 5dd8ccc
[#512] chore: join test & code check workflows into one
MSzalowski e3d7805
[#512] chore: set .nvmrc as node version source
MSzalowski 0284628
[#512] chore: split jobs to work in parallel; add emoji to label actions
MSzalowski 7a5d234
[#512] chore: fix tsc execution
MSzalowski e8d30fb
Merge pull request #515 from IntersectMBO/develop
pmbinapps f4143f0
[#516] Update deployment workflows to include missing variables
placek 3d2b76d
Merge pull request #517 from IntersectMBO/fix/516-resolving-deploymen…
placek c9e8c54
Merge pull request #513 from IntersectMBO/chore/512-add-eslint-tsc-an…
MSzalowski 5a4c24a
[#166] chore: add eslint & prettier configuration
MSzalowski b0c57b0
[#166] chore: enforce arrow component functions; disable obsolete or …
MSzalowski 28e9799
Merge pull request #511 from IntersectMBO/chore/166-integrate-eslint-…
MSzalowski ee6d34e
chore: cleanup ga submission code
MSzalowski 4b95651
Merge pull request #499 from IntersectMBO/chore/ga-submission-code-cl…
MSzalowski 2e400d6
update CSL
Sworzen1 7adca4a
npm / yarn
Sworzen1 4c53e16
move CSL into dependencies/ patch CSL pacakge
Sworzen1 7e2d0b3
delete unnecessary files
Sworzen1 3006b56
add info to changelog
Sworzen1 68df326
Merge pull request #520 from IntersectMBO/chore/update-CSL-to-19
Sworzen1 f139020
Merge pull request #518 from IntersectMBO/develop
pmbinapps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build and deploy GovTool to BETA server | ||
run-name: Deploy by @${{ github.actor }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
ENVIRONMENT: "beta" | ||
CARDANO_NETWORK: "sanchonet" | ||
DOMAIN: "sanchogov.tools" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-1 | ||
|
||
- name: Login to AWS ECR | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: eu-west-1 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }} | ||
|
||
- name: Deploy app | ||
run: | | ||
make --debug=b all | ||
|
||
- name: Reprovision Grafana | ||
run: | | ||
sleep 30 # give grafana time to start up | ||
make --debug=b reload-grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build and deploy GovTool to DEV server | ||
run-name: Deploy by @${{ github.actor }} | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
ENVIRONMENT: "dev" | ||
CARDANO_NETWORK: "sanchonet" | ||
DOMAIN: "dev-sanchonet.govtool.byron.network" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-1 | ||
|
||
- name: Login to AWS ECR | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: eu-west-1 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }} | ||
|
||
- name: Deploy app | ||
run: | | ||
make --debug=b all | ||
|
||
- name: Reprovision Grafana | ||
run: | | ||
sleep 30 # give grafana time to start up | ||
make --debug=b reload-grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build and deploy GovTool to STAGING server | ||
run-name: Deploy by @${{ github.actor }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
env: | ||
ENVIRONMENT: "staging" | ||
CARDANO_NETWORK: "sanchonet" | ||
DOMAIN: "staging.govtool.byron.network" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-1 | ||
|
||
- name: Login to AWS ECR | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: eu-west-1 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }} | ||
|
||
- name: Deploy app | ||
run: | | ||
make --debug=b all | ||
|
||
- name: Reprovision Grafana | ||
run: | | ||
sleep 30 # give grafana time to start up | ||
make --debug=b reload-grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build and deploy GovTool to TEST server | ||
run-name: Deploy by @${{ github.actor }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- test | ||
|
||
env: | ||
ENVIRONMENT: "test" | ||
CARDANO_NETWORK: "sanchonet" | ||
DOMAIN: "test-sanchonet.govtool.byron.network" | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./scripts/govtool | ||
env: | ||
DBSYNC_POSTGRES_DB: "cexplorer" | ||
DBSYNC_POSTGRES_USER: "postgres" | ||
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" | ||
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} | ||
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} | ||
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} | ||
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }} | ||
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} | ||
TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" | ||
GTM_ID: ${{ secrets.GTM_ID }} | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} | ||
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} | ||
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.GHA_AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.GHA_AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-1 | ||
|
||
- name: Login to AWS ECR | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-region: eu-west-1 | ||
|
||
- name: Setup SSH agent | ||
uses: webfactory/ssh-agent@v0.8.0 | ||
with: | ||
ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }} | ||
|
||
- name: Deploy app | ||
run: | | ||
make --debug=b all | ||
|
||
- name: Reprovision Grafana | ||
run: | | ||
sleep 30 # give grafana time to start up | ||
make --debug=b reload-grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Frontend Test, Lint & Type Check | ||
|
||
on: | ||
push: | ||
paths: | ||
- govtool/frontend/** | ||
- .github/workflows/test_frontend.yml | ||
|
||
defaults: | ||
run: | ||
working-directory: govtool/frontend | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: govtool/frontend/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "govtool/frontend/.nvmrc" | ||
|
||
- name: 🧪 Test | ||
run: | | ||
npm install | ||
npm run test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: govtool/frontend/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "govtool/frontend/.nvmrc" | ||
|
||
- name: 👕 Lint | ||
run: / | ||
npm install | ||
npm run lint | ||
|
||
type_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: govtool/frontend/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('govtool/frontend/package-lock.json') }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "govtool/frontend/.nvmrc" | ||
|
||
- name: 🔍 Type Check | ||
run: / | ||
npm install | ||
npm run tsc |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already fixed on development. I would not push it to staging now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can pull this first from dev to test, verify and then proceed to stage.