Skip to content

Commit

Permalink
Merge pull request #66 from IntershopCommunicationsAG/release/6.1
Browse files Browse the repository at this point in the history
chore: merge release 6.1.0 to master
  • Loading branch information
skiesewetter-intershop authored Dec 6, 2023
2 parents 1397b34 + 5147d58 commit df69283
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 863 deletions.
56 changes: 9 additions & 47 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,20 @@ name: Run build and tests
on:
push:
branches:
- '*'
- '**'
pull_request:
branches: [ master ]

jobs:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git fetch --all --tags

- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Build and test with Gradle
env:
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/[email protected]
- name: Build
uses: IntershopCommunicationsAG/.github/actions/[email protected]
65 changes: 17 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,26 @@ name: Run release build from tag
on:
push:
tags:
- '*'
- '**'

jobs:
release:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: temurin
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --all --tag
- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- id: install-secret-key
name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: export-gpg-file
name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Run gradle release
env:
JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository :publishPlugins -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/[email protected]
- name: Release
uses: IntershopCommunicationsAG/.github/actions/[email protected]
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties
signing-file: ${{ secrets.SIGNINGFILE }}
signing-key-id: ${{ secrets.SIGNINGKEYID }}
signing-password: ${{ secrets.SIGNINGPASSWORD }}
api-key: ${{ secrets.APIKEY }}
api-secret: ${{ secrets.APISECRET }}
sonatype-user: ${{ secrets.SONATYPEUSER }}
sonatype-password: ${{ secrets.SONATYPEPASSWORD }}
55 changes: 23 additions & 32 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.asciidoctor.gradle.jvm.AsciidoctorTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/*
* Copyright 2022 Intershop Communications AG.
Expand All @@ -20,47 +19,44 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {

// project plugins
`java-gradle-plugin`
groovy

kotlin("jvm") version "1.7.10"
kotlin("jvm") version "1.9.10"

// test coverage
jacoco

// ide plugin
idea

// publish plugin
`maven-publish`

// artifact signing - necessary on Maven Central
signing

// intershop version plugin
id("com.intershop.gradle.scmversion") version "6.2.0"
id("com.intershop.gradle.version.gitflow") version "1.8.0"

// plugin for documentation
id("org.asciidoctor.jvm.convert") version "3.3.2"

// documentation
id("org.jetbrains.dokka") version "1.5.0"

// code analysis for kotlin
id("io.gitlab.arturbosch.detekt") version "1.18.0"
id("org.jetbrains.dokka") version "1.9.10"

// plugin for publishing to Gradle Portal
id("com.gradle.plugin-publish") version "1.2.0"
id("com.gradle.plugin-publish") version "1.2.1"

id("com.dorongold.task-tree") version "2.1.1"
}

scm {
version.initialVersion = "1.0.0"

gitflowVersion {
versionType = "three"
defaultVersion = "1.0.0"
}

// release configuration
group = "com.intershop.gradle.jaxb"
description = "Gradle JAXB code generation plugin"
version = scm.version.version
version = gitflowVersion.version

val sonatypeUsername: String? by project
val sonatypePassword: String? by project
Expand Down Expand Up @@ -88,33 +84,30 @@ gradlePlugin {
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

// set correct project status
if (project.version.toString().endsWith("-SNAPSHOT")) {
status = "snapshot'"
}

detekt {
source = files("src/main/kotlin")
config = files("detekt.yml")
}

val buildDir = layout.buildDirectory.asFile.get()
tasks {
withType<Test>().configureEach {
testLogging tl@{
tl@this.showStandardStreams = true
tl@this.showStackTraces = true
tl@this.events(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED)
testLogging {
showStandardStreams = true
showStackTraces = true
events(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED)
}

this.javaLauncher.set( project.javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(11))
languageVersion.set(JavaLanguageVersion.of(17))
})

systemProperty("intershop.gradle.versions","8.0.2")
systemProperty("intershop.gradle.versions","8.5")

if(project.hasProperty("repoURL")
&& project.hasProperty("repoUser")
Expand Down Expand Up @@ -178,7 +171,7 @@ tasks {
xml.required.set(true)
html.required.set(true)

html.outputLocation.set( File(project.buildDir, "jacocoHtml") )
html.outputLocation.set( File(buildDir, "jacocoHtml") )
}

val jacocoTestReport by tasks
Expand All @@ -187,9 +180,7 @@ tasks {

getByName("jar").dependsOn("asciidoctor")

withType<KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}


dokkaJavadoc.configure {
outputDirectory.set(buildDir.resolve("dokka"))
Expand Down
Loading

0 comments on commit df69283

Please sign in to comment.