Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/devel' into fork/usu/chore/doc…
Browse files Browse the repository at this point in the history
…trine-orm-3

# Conflicts:
#	api/composer.json
#	api/composer.lock
  • Loading branch information
BacLuc committed Jan 2, 2025
2 parents 95595fd + 3a2e474 commit 82435fc
Show file tree
Hide file tree
Showing 55 changed files with 5,876 additions and 4,589 deletions.
4 changes: 2 additions & 2 deletions .docker-hub/print/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM node:22.11.0 AS build-stage
FROM node:22.12.0 AS build-stage
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PRINT_PROJECT
Expand All @@ -22,7 +22,7 @@ COPY print .
RUN npm run build

# production stage
FROM node:22.11.0 AS production-stage
FROM node:22.12.0 AS production-stage
WORKDIR /app

COPY --from=build-stage /app/.output ./.output
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -124,9 +124,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -153,9 +153,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -182,9 +182,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -214,9 +214,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -353,9 +353,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -396,9 +396,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -435,9 +435,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '22.11.0'
node-version: '22.12.0'

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/deploy-ecamp3-logging.yml
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
64 changes: 64 additions & 0 deletions .github/workflows/deploy-ops-dashboard.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: No "Meeting Discuss" label
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@d25134c992b943fb6ad00c25ea00eb5988c0a9dd # v5
- uses: mheap/github-action-required-labels@388fd6af37b34cdfe5a23b37060e763217e58b03 # v5
if: github.event_name == 'pull_request'
with:
mode: exactly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-api-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: 'echo "dir=$(composer config cache-files-dir)" | tr -d "\n" >> $GITHUB_OUTPUT'
working-directory: api

- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-e2e-tests-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
docker image ls -a --digests
- name: Restore cache volumes (npm, composer)
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: .cache
key: docker-compose-${{ hashFiles('frontend/package-lock.json', 'print/package-lock.json', 'api/composer.lock') }}-${{ matrix.browser }}
Expand Down
2 changes: 1 addition & 1 deletion .helm/ecamp3/files/hook_db_restore/.env-example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SOURCE_FILE=latest
APP_NAME=test-db-backup-job
DATABASE_URL=
#if you want to restore to your local database:
#DATABASE_URL=postgresql://ecamp3:ecamp3@<your-ip>:5432/ecamp3dev
#DATABASE_URL=postgresql://ecamp3:ecamp3@localhost:5432/ecamp3dev
ENCRYPTION_KEY=test
S3_ENDPOINT=https://s3.eu-west-3.amazonaws.com
S3_BUCKET=
Expand Down
7 changes: 7 additions & 0 deletions .helm/ecamp3/files/hook_db_restore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ It also contains a docker-compose.yml file to easily test the [restore-backup.sh
```shell
docker compose run --rm restore-backup
```
4. Maybe locally: change username and password of the support account
That we don't need sharp credentials in the local performance testing.
```shell
docker compose run --rm restore-backup sh update-support-email.sh
```
2 changes: 2 additions & 0 deletions .helm/ecamp3/files/hook_db_restore/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ services:
dockerfile: Dockerfile
volumes:
- ./restore-backup.sh:/restore-backup.sh
- ./update-support-email.sh:/update-support-email.sh
command:
- sh
- "-x"
- /restore-backup.sh
env_file: .env
network_mode: host
17 changes: 17 additions & 0 deletions .helm/ecamp3/files/hook_db_restore/update-support-email.sh
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.11.0
22.12.0
4 changes: 2 additions & 2 deletions .ops/aws-setup/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
aws-setup:
image: pulumi/pulumi-nodejs:3.142.0
image: pulumi/pulumi-nodejs:3.144.1
container_name: 'ecamp3-aws-setup'
volumes:
- ../../.prettierrc:/.prettierrc:delegated
Expand All @@ -13,7 +13,7 @@ services:
- AWS_DEFAULT_REGION=eu-west-3

aws-cli:
image: amazon/aws-cli:2.22.9
image: amazon/aws-cli:2.22.26
container_name: 'ecamp3-aws-cli'
volumes:
- ./.aws:/root/.aws:delegated
Expand Down
Loading

0 comments on commit 82435fc

Please sign in to comment.