-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1154: Split up current config into multiple files
- Loading branch information
Showing
23 changed files
with
522 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### AUTO GENERATED. DO NOT MODIFY. ### | ||
# This file should be auto generated by the files in the src folder. | ||
# You can update it by running `yarn run circleci:update-config`. |
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,5 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
gradle: circleci/[email protected] | ||
browser-tools: circleci/[email protected] |
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,5 @@ | ||
steps: | ||
- setup-npm-global | ||
- run: | ||
name: Install app-toolbelt | ||
command: npm install --unsafe-perm -g https://github.com/digitalfabrik/app-toolbelt/archive/refs/heads/main.tar.gz |
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,6 @@ | ||
steps: | ||
- run: | ||
name: Install Dart | ||
command: | | ||
curl -o dart.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.0.5/linux_packages/dart_3.0.5-1_amd64.deb | ||
sudo dpkg -i dart.deb |
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,6 @@ | ||
steps: | ||
- run: | ||
name: Install Dart | ||
command: | | ||
brew tap dart-lang/dart | ||
brew install dart |
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,23 @@ | ||
steps: | ||
- run: | ||
name: Install FVM | ||
command: | | ||
dart pub global activate fvm | ||
echo 'export PATH=$HOME/.pub-cache/bin:$PATH' >> $BASH_ENV | ||
- restore_cache: | ||
keys: | ||
- fvm-0-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }} | ||
- run: | ||
name: Install Flutter | ||
command: fvm install | ||
- save_cache: | ||
key: fvm-0-{{ checksum ".fvm/fvm_config.json" }}-{{ arch }} | ||
paths: | ||
- .fvm | ||
- ~/fvm/ | ||
- run: | ||
name: Show Flutter version | ||
command: fvm flutter --version | ||
- run: | ||
name: Configure Flutter | ||
command: fvm flutter config --no-analytics |
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,13 @@ | ||
steps: | ||
- run: | ||
name: Install protobuf from GitHub | ||
command: | | ||
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v21.11/protoc-21.11-linux-x86_64.zip" | ||
unzip protoc*.zip -d $HOME/.local | ||
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV | ||
- run: | ||
name: Install Flutter plugin | ||
# Do not use the dart from fvm here for installing protoc_plugin. | ||
# Else we might get a "Can't load Kernel binary: Invalid kernel binary format version" because the dart | ||
# versions do not match. | ||
command: dart pub global activate protoc_plugin |
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,11 @@ | ||
steps: | ||
- run: | ||
name: Install protobuf | ||
command: | | ||
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v21.11/protoc-21.11-osx-x86_64.zip" | ||
unzip protoc*.zip -d $HOME/.local | ||
echo 'export PATH=$HOME/.local/bin:$PATH' >> $BASH_ENV | ||
- run: | ||
name: Install Flutter plugin | ||
# Use dart directly here. See comment in install-protobuf-linux | ||
command: dart pub global activate protoc_plugin |
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,7 @@ | ||
steps: | ||
- run: | ||
name: Setup npm | ||
command: | | ||
mkdir -p ~/.npm-global | ||
npm config set prefix '~/.npm-global' | ||
echo 'export PATH=~/.npm-global/bin:"$PATH"' >> "$BASH_ENV" |
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,37 @@ | ||
docker: | ||
- image: cimg/node:19.1.0 | ||
environment: | ||
working_directory: ~/project/administration | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- restore_cache: | ||
keys: | ||
- v1-node-modules-{{ checksum "package.json" }}-{{checksum "package-lock.json" }} | ||
- install-dart-linux | ||
- install-protobuf-linux | ||
- run: | ||
name: Install node dependencies | ||
command: "[ ! -d node_modules ] && npm ci --loglevel warn --yes || echo package.json and package-lock.json unchanged. Using cache." | ||
- run: | | ||
npm run generate-graphql | ||
npm run generate-protobuf | ||
- run: | ||
name: Lint | ||
command: npm run lint | ||
- run: | ||
name: Test | ||
command: npm run test -- --maxWorkers=2 | ||
- run: | ||
name: Build | ||
command: npm run build | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-node-modules-{{ checksum "package.json" }}-{{checksum "package-lock.json" }} | ||
- store_artifacts: | ||
path: build | ||
- persist_to_workspace: | ||
root: ~/project | ||
paths: | ||
- administration/build |
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,18 @@ | ||
docker: | ||
- image: debian:11 # We deploy on debian -> pack on debian | ||
working_directory: ~/project/administration | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: ~/project/scripts/pack_deb.sh -v "0.$CIRCLE_BUILD_NUM" -f /tmp/workspace/administration/build -d "Administration backend for the Ehrenamtskarte app" -n "eak-administration" | ||
- run: | | ||
mkdir -p /tmp/artifacts/debs | ||
mv *.deb /tmp/artifacts/debs | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
- persist_to_workspace: | ||
root: /tmp/artifacts | ||
paths: | ||
- debs/*.deb |
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,39 @@ | ||
environment: | ||
_JAVA_OPTIONS: "-Xmx3g" | ||
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2" | ||
docker: | ||
- image: cimg/openjdk:17.0.6-node | ||
working_directory: ~/project/backend | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- run: git submodule sync | ||
- run: git submodule update --init | ||
- restore_cache: | ||
key: v2-gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }} | ||
- restore_cache: | ||
key: v2-gradle-cache-{{ checksum "build.gradle.kts" }} | ||
- run: | ||
name: Check that GraphQL scheme is stable | ||
command: | | ||
./gradlew run --args="graphql-export ../specs/backend-api.graphql" | ||
git diff --exit-code | ||
- run: | ||
name: Test | ||
command: | | ||
./gradlew test | ||
- run: ./gradlew build | ||
- save_cache: | ||
paths: | ||
- .gradle/wrapper | ||
key: v2-gradle-wrapper-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }} | ||
- save_cache: | ||
paths: | ||
- .gradle/caches | ||
key: v2-gradle-cache-{{ checksum "build.gradle.kts" }} | ||
- store_artifacts: | ||
path: build/libs | ||
- persist_to_workspace: | ||
root: ~/project | ||
paths: | ||
- backend/build/distributions/* |
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,36 @@ | ||
docker: | ||
- image: cimg/base:2023.03 | ||
- image: postgis/postgis:13-3.0-alpine | ||
environment: | ||
- POSTGRES_DB=ehrenamtskarte | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: | ||
name: Install Curl | ||
command: | | ||
sudo apt update | ||
sudo apt install curl -y | ||
- run: | ||
name: Install ca-certificates-java # workaround for current issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030129 | ||
command: sudo apt install ca-certificates-java | ||
- run: | ||
name: Install openjdk-17-jre-headless | ||
command: sudo apt install openjdk-17-jre-headless -y | ||
- run: | ||
name: Install backend | ||
command: sudo dpkg -i /tmp/workspace/debs/eak-backend*.deb | ||
- run: | ||
name: Run migrate | ||
command: /opt/ehrenamtskarte/backend/bin/backend migrate | ||
- run: | ||
name: Start backend | ||
command: /opt/ehrenamtskarte/backend/bin/backend execute | ||
background: true | ||
- run: | ||
name: Check health | ||
command: curl --retry 120 --retry-delay 1 --retry-all-errors http://0.0.0.0:8000/health |
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,18 @@ | ||
docker: | ||
- image: debian:11 # We deploy on debian -> pack on debian | ||
working_directory: ~/project/backend | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: ~/project/scripts/pack_deb.sh -v "0.$CIRCLE_BUILD_NUM" -t /tmp/workspace/backend/build/distributions/*.tar -s ~/project/scripts/eak-backend.service -d "Backend server for the Ehrenamtskarte app" -n "eak-backend" -c "openjdk-17-jre-headless" | ||
- run: | | ||
mkdir -p /tmp/artifacts/debs | ||
mv *.deb /tmp/artifacts/debs | ||
- store_artifacts: | ||
path: /tmp/artifacts | ||
- persist_to_workspace: | ||
root: /tmp/artifacts | ||
paths: | ||
- debs/*.deb |
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,35 @@ | ||
docker: | ||
- image: cimg/node:19.1.0-browsers | ||
resource_class: small | ||
working_directory: ~/project/frontend | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- browser-tools/install-chrome | ||
- install-dart-linux | ||
- install-fvm | ||
- install-app-toolbelt | ||
- install-protobuf-linux | ||
- run: | ||
name: Install Flutter Packages | ||
command: fvm flutter pub get --enforce-lockfile | ||
- run: | ||
name: Check Formatting | ||
command: fvm dart format -l 120 -o none --set-exit-if-changed . | ||
- run: | ||
name: Build Runner | ||
command: | | ||
# Statically use "bayern" build config for analyzing here | ||
fvm flutter pub run build_runner build --define "df_build_config=name=bayern" | ||
- run: | ||
name: Check Analyzer and Linting | ||
command: | | ||
fvm flutter analyze --fatal-infos --fatal-warnings | ||
fvm flutter analyze pubs/df_build_config --fatal-infos --fatal-warnings | ||
fvm flutter analyze pubs/df_protobuf --fatal-infos --fatal-warnings | ||
- run: | ||
name: Tests | ||
command: | | ||
fvm flutter test | ||
fvm flutter test pubs/df_build_config | ||
fvm flutter test pubs/df_protobuf |
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,25 @@ | ||
docker: | ||
- image: cimg/base:2022.09 | ||
parameters: | ||
server: | ||
enum: | ||
- entitlementcard.tuerantuer.org | ||
- entitlementcard-test.tuerantuer.org | ||
type: enum | ||
ssh-host-fingerprint: | ||
enum: | ||
- '|1|dkYQrdGB1QML0o+POL3QzAkBbek=|b4Tm0Ymh82UKyZPJfVKy4t+MFV8= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIONuARu18Fktz+j4QosI+nRqgMnFOMgE7OZLuTOwgZ0k' | ||
- '|1|iikuvSrIo3wkj+EqUgLRMsAq6yk=|r9bSjkawWFa94b45qE/se5Oio5k= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIED3MwobbCs+ENMLXdyqlJb3bJ26TuIYt977TA3NrN66' | ||
type: enum | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "a1:3f:a7:c3:ff:12:40:1d:85:de:a7:ab:12:3f:cc:05" | ||
- run: | ||
name: "SFTP upload" | ||
command: | | ||
echo "<< parameters.ssh-host-fingerprint >>" >> known_hosts | ||
echo "Uploading: " /tmp/workspace/debs/*.deb | ||
sftp -b - -o UserKnownHostsFile=known_hosts ci@<< parameters.server >>:/local-apt-repository/ \<<< "put -r /tmp/workspace/debs/*.deb" |
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,35 @@ | ||
docker: | ||
- image: cimg/android:2022.09.2-node | ||
parameters: | ||
buildConfig: | ||
description: "Name of the build config to use" | ||
type: string | ||
flutterFlavor: | ||
description: "Flutter Flavor to use" | ||
type: string | ||
environment: | ||
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m" -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2' | ||
resource_class: large | ||
working_directory: ~/project/frontend | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- install-dart-linux | ||
- install-fvm | ||
- install-app-toolbelt | ||
- install-protobuf-linux | ||
- run: | ||
name: Install Flutter Packages | ||
command: | | ||
fvm flutter pub get --enforce-lockfile | ||
fvm flutter precache --android | ||
- run: | ||
name: Build Runner | ||
command: | | ||
fvm flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>" | ||
- run: | ||
name: Build | ||
command: | | ||
fvm flutter build apk --dart-define=environment=production --flavor << parameters.flutterFlavor >> --release -t lib/main.dart | ||
- store_artifacts: | ||
path: build/app/outputs/flutter-apk/ |
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,37 @@ | ||
macos: | ||
xcode: 14.0.0 | ||
parameters: | ||
buildConfig: | ||
description: "Name of the build config to use" | ||
type: string | ||
flutterFlavor: | ||
description: "Flutter Flavor to use" | ||
type: string | ||
working_directory: ~/project/frontend | ||
steps: | ||
- checkout: | ||
path: ~/project | ||
- install-dart-mac | ||
- install-fvm | ||
- install-app-toolbelt | ||
- install-protobuf-mac | ||
- run: | ||
name: Install Flutter Packages | ||
command: | | ||
fvm flutter pub get --enforce-lockfile | ||
fvm flutter precache --ios | ||
- run: | ||
name: Update Pods | ||
command: | | ||
cd ios | ||
pod update # This command is somehow needed: https://github.com/m0nac0/flutter-maplibre-gl/pull/9 | ||
pod install | ||
- run: | ||
name: Build Runner | ||
command: | | ||
fvm flutter pub run build_runner build --define "df_build_config=name=<< parameters.buildConfig >>" | ||
- run: | ||
name: Build | ||
command: | | ||
app-toolbelt v0 build-config write-xcconfig "<< parameters.buildConfig >>" ios --directory ios/ | ||
fvm flutter build ios --dart-define=environment=production --flavor << parameters.flutterFlavor >> --no-codesign --release -t lib/main.dart |
Oops, something went wrong.