From 6ea55c70c4ab0c2ffcac467b42fc5efe7b108f08 Mon Sep 17 00:00:00 2001 From: Michael Kora <80787590+MichaelKora@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:55:04 +0100 Subject: [PATCH] Migrate azure pipeline to GH-action (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yannick Röder --- .github/workflows/build-and-publish.yaml | 21 +++++++++++++++ .github/workflows/release.yaml | 25 +++++++++++++++++ .gitignore | 1 + azure-pipelines.yml | 27 ------------------- build.gradle.kts | 3 +++ .../build.gradle.kts | 2 +- 6 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/build-and-publish.yaml create mode 100644 .github/workflows/release.yaml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml new file mode 100644 index 0000000..7440b17 --- /dev/null +++ b/.github/workflows/build-and-publish.yaml @@ -0,0 +1,21 @@ +name: Build and Publish + +on: + push: + tags: ["**"] + branches: ["**"] + +jobs: + build-and-publish: + name: Java Gradle + uses: bakdata/ci-templates/.github/workflows/java-gradle-library.yaml@1.40.5 + secrets: + sonar-token: ${{ secrets.SONARCLOUD_TOKEN }} + sonar-organization: ${{ secrets.SONARCLOUD_ORGANIZATION }} + signing-secret-key-ring: ${{ secrets.SONATYPE_SIGNING_SECRET_KEY_RING }} + signing-key-id: ${{ secrets.SONATYPE_SIGNING_KEY_ID }} + signing-password: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} + ossrh-username: ${{ secrets.SONATYPE_OSSRH_USERNAME }} + ossrh-password: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} + github-username: ${{ secrets.GH_USERNAME }} + github-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..7ee0f6c --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: Release + +on: + workflow_dispatch: + inputs: + release-type: + description: "The scope of the release (major, minor or patch)." + type: choice + required: true + default: patch + options: + - patch + - minor + - major + +jobs: + java-gradle-release: + name: Java Gradle + uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.40.5 + with: + release-type: "${{ inputs.release-type }}" + secrets: + github-email: "${{ secrets.GH_EMAIL }}" + github-username: "${{ secrets.GH_USERNAME }}" + github-token: "${{ secrets.GH_TOKEN }}" diff --git a/.gitignore b/.gitignore index e670f04..e2a8d6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .* !.gitignore +!.github !.travis.yml build/ out/ diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ceb0cba..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -trigger: - branches: - include: - - refs/heads/* - - refs/tags/* -pr: - branches: - include: - - master - -variables: -- group: sonarqube -- group: sign -- group: ossrh - -resources: - repositories: - - repository: templates - type: github - name: bakdata/bakdata-project-templates - endpoint: bot - -jobs: -- template: azure/gradle/build.yml@templates -- template: azure/gradle/create_tag_version.yml@templates -- template: azure/gradle/upload_release.yml@templates -- template: azure/gradle/upload_snapshot.yml@templates diff --git a/build.gradle.kts b/build.gradle.kts index 34c44b7..aa69955 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -61,3 +61,6 @@ subprojects { "testAnnotationProcessor"("org.projectlombok:lombok:1.18.6") } } + +val sonarqube by tasks +sonarqube.enabled = false //FIXME requires Java 17 diff --git a/kafka-streams-reflect-avro-serde/build.gradle.kts b/kafka-streams-reflect-avro-serde/build.gradle.kts index f8510b4..7f177f7 100644 --- a/kafka-streams-reflect-avro-serde/build.gradle.kts +++ b/kafka-streams-reflect-avro-serde/build.gradle.kts @@ -5,7 +5,7 @@ plugins { description = "Provides an Avro Serde that can (de)serialize (almost) arbitrary Java objects in Kafka Streams." repositories { - maven(url = "http://packages.confluent.io/maven/") + maven(url = "https://packages.confluent.io/maven/") } dependencies {