Skip to content

Commit

Permalink
Merge pull request #306 from swisstopo/develop
Browse files Browse the repository at this point in the history
Release Candidate v1.5.0
  • Loading branch information
vej-ananas authored Oct 17, 2024
2 parents c3d2583 + 18c3c29 commit cba6a85
Show file tree
Hide file tree
Showing 255 changed files with 6,255 additions and 4,000 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
134 changes: 70 additions & 64 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,67 +150,73 @@ jobs:
run: npx nx reset
- name: Run build
run: npm run build
# cypress:
# runs-on: ubuntu-latest
# needs:
# - test
# - lint
# - dependency-review
# strategy:
# # https://github.com/cypress-io/github-action/issues/48
# fail-fast: false
# matrix:
# # Use 2 parallel instances
# containers: [1, 2]
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup node
# uses: actions/setup-node@v4
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Restore cached node modules
# uses: actions/cache/restore@v4
# with:
# path: ./node_modules
# key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
# - name: Start services
# env:
# DB_USER: ${{ env.DB_USERNAME }}
# DB_PASSWORD: ${{ env.DB_PASSWORD }}
# run: |
# cd development
# chmod +x ./init/elasticsearch/init.sh
# sed -i 's/- \.\/volumes\/elasticsearch\/data:\/usr\/share\/elasticsearch\/data//g' ./docker-compose.yaml
# docker compose up -d db oidc elasticsearch
# sleep 60
# - name: Migrate database
# run: npm run prisma -- migrate deploy
# - name: Restore cached e2e node modules
# uses: actions/cache/restore@v4
# with:
# path: ./e2e/node_modules
# key: "${{ runner.os }}-node_modules_e2e-${{ env.NODE_VERSION }}-${{ hashFiles('./e2e/package-lock.json') }}"
# - name: Cypress run
# uses: cypress-io/github-action@v6
# with:
# command: |
# npx cypress run \
# --browser edge \
# --record \
# --parallel \
# --key ${{ secrets.CYPRESS_RECORD_KEY }} \
# --ci-build-id ${{ github.repository }}-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
# build: npm run build
# start: npm start
# wait-on: "http://localhost:4200"
# wait-on-timeout: 120
# working-directory: ./e2e
# env:
# VITE_APP_VERSION: 0.0.99+dev
# TZ: Europe/Zurich
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Stop services
# run: |
# cd development
# docker compose down
cypress:
runs-on: ubuntu-latest
needs:
- test
- lint
- dependency-review
strategy:
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# Use 2 parallel instances
containers: [1, 2]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Restore cached node modules
uses: actions/cache/restore@v4
with:
path: ./node_modules
key: "${{ runner.os }}-node_modules-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/schema.prisma') }}"
- name: Install dos2unix
run: sudo apt-get update && sudo apt-get install -y dos2unix
- name: Start services
env:
DB_USER: ${{ env.DB_USERNAME }}
DB_PASSWORD: ${{ env.DB_PASSWORD }}
run: |
cd development
touch .env.ocr
dos2unix ./init/elasticsearch/init.sh
chmod +x ./init/elasticsearch/init.sh
chmod +r ./init/elasticsearch/mappings/swissgeol_asset_asset.json
sed -i 's/- \.\/volumes\/elasticsearch\/data:\/usr\/share\/elasticsearch\/data//g' ./docker-compose.yaml
docker compose up -d db oidc elasticsearch
sleep 120
docker logs $(docker ps --filter "name=elasticsearch" --format "{{.ID}}")
- name: Migrate database
run: npm run prisma -- migrate deploy
- name: Restore cached e2e node modules
uses: actions/cache/restore@v4
with:
path: ./e2e/node_modules
key: "${{ runner.os }}-node_modules_e2e-${{ env.NODE_VERSION }}-${{ hashFiles('./e2e/package-lock.json') }}"
- name: Cypress run
uses: cypress-io/github-action@v6
with:
command: |
npx cypress run \
--browser edge \
--record \
--parallel \
--key ${{ secrets.CYPRESS_RECORD_KEY }} \
--ci-build-id ${{ github.repository }}-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
build: npm run build
start: npm start
wait-on: "http://localhost:4200"
wait-on-timeout: 120
working-directory: ./e2e
env:
VITE_APP_VERSION: 0.0.99+dev
TZ: Europe/Zurich
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stop services
run: |
cd development
docker compose down
18 changes: 18 additions & 0 deletions .github/workflows/publish-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,30 @@ jobs:
DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_and_push_sync:
name: "build and push sync"
needs:
- determine_version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create image
uses: ./.github/actions/create-image
with:
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-sync
TAG: ${{ env.IS_EDGE == 'true' && 'edge' || '' }}
VERSION: ${{ needs.determine_version.outputs.version }}
DOCKERFILE: ./apps/sync-asset-sg/docker/Dockerfile
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tag_commit:
name: "tag commit"
needs:
- determine_version
- build_and_push_api
- build_and_push_app
- build_and_push_sync
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,28 @@ jobs:
- name: Push docker image
run: docker push ${{ vars.BASE_IMAGE_NAME }}-api:release-candidate

tag_rc_image_sync:
name: tag rc image sync
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Packages
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Pull docker image
run: docker pull ${{ vars.BASE_IMAGE_NAME }}-sync:${{ env.BASE }}

- name: Tag docker image
run: docker tag ${{ vars.BASE_IMAGE_NAME }}-sync:${{ env.BASE }} ${{ vars.BASE_IMAGE_NAME }}-sync:release-candidate

- name: Push docker image
run: docker push ${{ vars.BASE_IMAGE_NAME }}-sync:release-candidate

tag_rc_commit:
name: "tag rc commit"
needs:
- tag_rc_image_app
- tag_rc_image_api
- tag_rc_image_sync
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,33 @@ jobs:
DOCKERFILE: ./apps/client-asset-sg/docker/Dockerfile
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_and_push_sync:
name: "build and push sync"
needs:
- determine_version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create image
uses: ./.github/actions/create-image
with:
IMAGE_NAME: ${{ vars.BASE_IMAGE_NAME }}-sync
TAG: latest
OTHER_TAGS: |
type=raw,value=${{ env.IS_EDGE == 'true' && 'edge' || '' }}
type=raw,value=${{ env.IS_RC == 'true' && 'release-candidate' || '' }}
VERSION: ${{ needs.determine_version.outputs.version }}
DOCKERFILE: ./apps/sync-asset-sg/docker/Dockerfile
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tag_commit:
name: "tag commit"
needs:
- determine_version
- build_and_push_api
- build_and_push_app
- build_and_push_sync
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -138,6 +159,7 @@ jobs:
- determine_version
- build_and_push_api
- build_and_push_app
- build_and_push_sync
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -194,3 +216,4 @@ jobs:
await removePackageVersions(`${process.env.BASE_IMAGE_NAME}-api`, outdatedVersions);
await removePackageVersions(`${process.env.BASE_IMAGE_NAME}-app`, outdatedVersions);
await removePackageVersions(`${process.env.BASE_IMAGE_NAME}-sync`, outdatedVersions);
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ __pycache__

# NX cache
.nx/

# Asset sync progress file
asset-sync-progress.tmp.json
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@

### Added

### Changed

### Fixed

## v1.5.0

### Added

- Anonymer Modus für view-assets
- Synchronisations-Service zwischen verschiedenen Instanzen prod, prod-extern, prod-view
- Dokumente für rechtliche Einwilligungen (_Legal Docs_) können nun separat von normalen Dateien
hochgeladen und angezeigt werden. Diese Einwilligungen können zusätzlich mit einem Typ versehen werden,
der die Art von Dokument wiederspiegelt.

### Changed

- Admins haben nun auf alle Arbeitsgruppen Leserechte anstatt Schreibrechte - für das Schreiben muss ein Admin sich der Arbeitsgruppe hinzufügen
- Der Button für Polygon-Filter ist nun links bei den restlichen Filtern
- Dependency Updates
- Existierende Dateien, welche mit `_LDoc.pdf` enden,
wurden als rechtliche Einwilligung mit Typ `permissionForm` markiert.
- PDFs werden mit dem neuen [OCR Service](https://github.com/swisstopo/swissgeol-ocr) verarbeitet, um den Text zu extrahieren
- Sidebar und Header wurden entsprechend dem neuen UI/UX Konzept überarbeitet

### Fixed

- Benutzer mit Underscore in der Email können nun auch auf die Appliation zugreifen
- Die Trefferzahlen bei Filtern spiegeln nun die tatsächliche Anzahl der Treffer wieder - davor wurden nicht alle Werte beachtet
- Navigation der Applikation über vorwärts und rückwärts Buttons behält nun den Suchstatus bei
- Eine benutzerfreundliche Fehlermeldung wird angezeigt, wenn beim erstellen einer neuen Workgroup der Name bereits verwendet wird

## v1.4.0

### Added

- Suchfilter zeigen Anzahl Ergebnisse und sind inital verfügbar
- Mehrsprachigkeit von Assets
- Versionsnummer der Applikation wird angezeigt
Expand Down
Loading

0 comments on commit cba6a85

Please sign in to comment.