forked from ecamp/ecamp3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/devel' into fork/usu/chore/doc…
…trine-orm-3 # Conflicts: # api/composer.json # api/composer.lock
- Loading branch information
Showing
55 changed files
with
5,876 additions
and
4,589 deletions.
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
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
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
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,63 @@ | ||
name: Deploy ecamp3-logging | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Choose environment' | ||
type: environment | ||
required: true | ||
|
||
jobs: | ||
deploy-ecamp3-logging: | ||
name: "Deploy ecamp3-logging" | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.event.inputs.environment }} | ||
steps: | ||
- name: Validate environment | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
if (!"${{ github.event.inputs.environment }}".startsWith("ecamp3-logging")) { | ||
throw new Error("Environment must start with 'ecamp3-logging'"); | ||
} | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Dump secrets to .env | ||
run: | | ||
echo '${{ toJSON(secrets) }}' | jq -r 'keys[] as $k | select(.[$k] |contains("\n") | not) | "\($k)=\"\(.[$k])\""' >> .env | ||
working-directory: .ops/ecamp3-logging | ||
|
||
- name: Dump variables to .env | ||
run: | | ||
echo '${{ toJSON(vars) }}' | jq -r 'keys[] as $k | select(.[$k] |contains("\n") | not) | "\($k)=\"\(.[$k])\""' >> .env | ||
working-directory: .ops/ecamp3-logging | ||
|
||
- name: Show .env for debugging | ||
run: echo "$(cat .env | sort)" | ||
working-directory: .ops/ecamp3-logging | ||
|
||
- name: Setup helm | ||
run: | | ||
mkdir ~/.kube && echo '${{ secrets.KUBECONFIG }}' > ~/.kube/config && chmod go-r ~/.kube/config | ||
- name: Add helm repositories | ||
run: | | ||
helm repo add fluent https://fluent.github.io/helm-charts | ||
helm repo update | ||
- name: Diff deployment | ||
run: | | ||
./deploy.sh diff || true | ||
working-directory: .ops/ecamp3-logging | ||
|
||
- name: Show values.out.yaml | ||
run: cat values.out.yaml | ||
working-directory: .ops/ecamp3-logging | ||
|
||
- name: Deploy | ||
run: | | ||
./deploy.sh deploy | ||
working-directory: .ops/ecamp3-logging |
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: Deploy ops-dashboard | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Choose environment' | ||
type: environment | ||
required: true | ||
|
||
jobs: | ||
deploy-ops-dashboard: | ||
name: "Deploy ops-dashboard" | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.event.inputs.environment }} | ||
steps: | ||
- name: Validate environment | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
if (!"${{ github.event.inputs.environment }}".startsWith("ops-dashboard")) { | ||
throw new Error("Environment must start with 'ops-dashboard'"); | ||
} | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
||
- name: Dump secrets to .env | ||
run: | | ||
echo '${{ toJSON(secrets) }}' | jq -r 'keys[] as $k | select(.[$k] |contains("\n") | not) | "\($k)=\"\(.[$k])\""' >> .env | ||
working-directory: .ops/ops-dashboard | ||
|
||
- name: Dump variables to .env | ||
run: | | ||
echo '${{ toJSON(vars) }}' | jq -r 'keys[] as $k | select(.[$k] |contains("\n") | not) | "\($k)=\"\(.[$k])\""' >> .env | ||
working-directory: .ops/ops-dashboard | ||
|
||
- name: Show .env for debugging | ||
run: echo "$(cat .env | sort)" | ||
working-directory: .ops/ops-dashboard | ||
|
||
- name: Setup helm | ||
run: | | ||
mkdir ~/.kube && echo '${{ secrets.KUBECONFIG }}' > ~/.kube/config && chmod go-r ~/.kube/config | ||
- name: Add helm repositories | ||
run: | | ||
helm repo add oauth2-proxy https://oauth2-proxy.github.io/manifests | ||
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/ | ||
helm repo update | ||
- name: Diff deployment | ||
run: | | ||
./deploy.sh diff || true | ||
working-directory: .ops/ops-dashboard | ||
|
||
- name: Show values.out.yaml | ||
run: cat values.out.yaml | ||
working-directory: .ops/ops-dashboard | ||
|
||
- name: Deploy | ||
run: | | ||
./deploy.sh deploy | ||
working-directory: .ops/ops-dashboard |
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
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
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
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
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
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
17 changes: 17 additions & 0 deletions
17
.helm/ecamp3/files/hook_db_restore/update-support-email.sh
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,17 @@ | ||
set -e | ||
|
||
tmpfile=$(mktemp) | ||
|
||
cat << 'EOF' | tee -a $tmpfile | ||
BEGIN; | ||
WITH profile as (SELECT id from profile WHERE email = '[email protected]'), | ||
update_password as (UPDATE "user" SET password = '$2y$13$KTCSklVQHNvbwJQ3Awl8Ee7t0wJB1gfRBXDANeQlBblqwJ4wgOEmC' WHERE profileid = (SELECT id FROM profile)), | ||
update_email as (UPDATE "profile" SET email = '[email protected]' WHERE id = (SELECT id FROM profile)) | ||
SELECT 1; | ||
COMMIT; | ||
EOF | ||
|
||
psql $DATABASE_URL -v ON_ERROR_STOP=1 < $tmpfile |
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 |
---|---|---|
@@ -1 +1 @@ | ||
22.11.0 | ||
22.12.0 |
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
Oops, something went wrong.