From 58fa877cd448a2875dc02c8b50cba17d94625b7b Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 11:46:28 +0200 Subject: [PATCH 01/10] Updated readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 9f4b41e..d8b55b9 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ # workshop-wizard +The application for managing workshops of JavaZone. Includes registration, cancellation and all of the good stuff :):) + +## Prerequisites + +### Backend +JDK 17 +Docker (or other container runtime) + +To start the application: Go to the backend folder and `gradle app:run` or run it through your favorite editor + +### Frontend +TBD From 4d7500173b08aedf99a7b79fcd8efe5f71400d77 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 11:56:29 +0200 Subject: [PATCH 02/10] Add logback --- backend/app/src/main/resources/logback.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 backend/app/src/main/resources/logback.xml diff --git a/backend/app/src/main/resources/logback.xml b/backend/app/src/main/resources/logback.xml new file mode 100644 index 0000000..0ad1cd7 --- /dev/null +++ b/backend/app/src/main/resources/logback.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file From 9460a9cc4e1964433f4e056ecad4c3813e86e938 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:03:45 +0200 Subject: [PATCH 03/10] Add logstash as dependency --- backend/app/build.gradle.kts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/app/build.gradle.kts b/backend/app/build.gradle.kts index d782f98..86787ce 100644 --- a/backend/app/build.gradle.kts +++ b/backend/app/build.gradle.kts @@ -24,6 +24,7 @@ dependencies { val ktor_version = "2.3.5" val logback_version = "1.4.11" val slf4j_version = "2.0.9" + val logstash_version = "7.4" // Use the Kotlin JUnit 5 integration. testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") @@ -36,8 +37,9 @@ dependencies { implementation("io.ktor:ktor-server-content-negotiation:$ktor_version") testImplementation("io.ktor:ktor-server-test-host:$ktor_version") - implementation("ch.qos.logback:logback-classic:$logback_version") - implementation("org.slf4j:slf4j-api:$slf4j_version") + runtimeOnly("ch.qos.logback:logback-classic:$logback_version") + runtimeOnly("org.slf4j:slf4j-api:$slf4j_version") + runtimeOnly("net.logstash.logback:logstash-logback-encoder:$logstash_version") } From d2d8a13d16ffa9ab9e9194f5256e89c2bb96bde8 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:17:48 +0200 Subject: [PATCH 04/10] Tryout pinning --- backend/.github/workflows/main.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 backend/.github/workflows/main.yml diff --git a/backend/.github/workflows/main.yml b/backend/.github/workflows/main.yml new file mode 100644 index 0000000..b1e6250 --- /dev/null +++ b/backend/.github/workflows/main.yml @@ -0,0 +1,20 @@ +on: + push: + branches: + - main + +jobs: + build: + name: Build the application + runs-on: ubuntu-22.04 + concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - name: Checkout the code + uses: actions/checkout@v4 + + - name: Pin images + uses: docker://ghcr.io/sethvargo/ratchet:0.4.0 + with: + args: pin .github/workflows/main.yml From 0da1adda93e6186aa10e2446f8a0e6c40ff19ae5 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:19:16 +0200 Subject: [PATCH 05/10] Moved the github folder --- {backend/.github => .github}/workflows/main.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {backend/.github => .github}/workflows/main.yml (100%) diff --git a/backend/.github/workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from backend/.github/workflows/main.yml rename to .github/workflows/main.yml From e65ae3fe4615779783d73e79100031707e88afe5 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:28:45 +0200 Subject: [PATCH 06/10] Pin the image with ratchet --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1e6250..dd1f609 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ on: push: branches: - main - jobs: build: name: Build the application @@ -12,9 +11,4 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} steps: - name: Checkout the code - uses: actions/checkout@v4 - - - name: Pin images - uses: docker://ghcr.io/sethvargo/ratchet:0.4.0 - with: - args: pin .github/workflows/main.yml + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4 From bd3ef75757591e6089614ba868c6a0ead3aa48ff Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 13:52:09 +0200 Subject: [PATCH 07/10] Run gradle build in the pipeline --- .github/workflows/main.yml | 7 +++++++ .idea/.gitignore | 8 ++++++++ .idea/gradle.xml | 17 +++++++++++++++++ .idea/jarRepositories.xml | 20 ++++++++++++++++++++ .idea/kotlinc.xml | 6 ++++++ .idea/misc.xml | 10 ++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ .idea/workshop-wizard.iml | 9 +++++++++ 9 files changed, 91 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/gradle.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/kotlinc.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workshop-wizard.iml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd1f609..bf1b626 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,3 +12,10 @@ jobs: steps: - name: Checkout the code uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4 + - name: Setup java + uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # ratchet:actions/setup-java@v3 + run: ./gradlew build --no-daemon + with: + distribution: temurin + java-version: 17 + cache: gradle diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..89af8ca --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..fdc392f --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..fdf8d99 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..a5d7fc9 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5b2273d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workshop-wizard.iml b/.idea/workshop-wizard.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/workshop-wizard.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file From 41c61269b95aef74e25de40f94e615590cc22271 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 13:53:16 +0200 Subject: [PATCH 08/10] Fix the build --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf1b626..79a354e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,8 +14,9 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4 - name: Setup java uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # ratchet:actions/setup-java@v3 - run: ./gradlew build --no-daemon with: distribution: temurin java-version: 17 cache: gradle + - name: Run gradle build + run: ./gradlew build --no-daemon From bd95c7a575f7277e5e0aa599817a9cf73276465b Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 13:57:42 +0200 Subject: [PATCH 09/10] Run the build in the backend directory --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79a354e..3ccdb5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,13 @@ on: push: branches: - main + paths: + - backend jobs: - build: + build-backend: + defaults: + run: + working-directory: backend name: Build the application runs-on: ubuntu-22.04 concurrency: From d5ffdf701d8729c358b987c09f0562dad1709501 Mon Sep 17 00:00:00 2001 From: Tanet Trimas <42898343+tanettrimas@users.noreply.github.com> Date: Sat, 28 Oct 2023 13:58:26 +0200 Subject: [PATCH 10/10] Remove the paths --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ccdb5d..aeaa135 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,6 @@ on: push: branches: - main - paths: - - backend jobs: build-backend: defaults: