-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
397 additions
and
9 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,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
continuation_indent_size = 4 |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
*.bat text eol=crlf | ||
* text=auto | ||
*.bat text eol=crlf | ||
gradlew text eol=lf |
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,17 @@ | ||
--- | ||
name: "Install Docker on macOS" | ||
description: "Performs an unattended install of Docker Desktop for MacOS" | ||
runs: | ||
using: "composite" | ||
steps: | ||
# From https://github.com/docker/for-mac/issues/2359#issuecomment-943131345 | ||
- run: | | ||
brew install --cask docker | ||
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components | ||
open -a /Applications/Docker.app --args --unattended --accept-license | ||
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done | ||
shell: bash | ||
branding: | ||
icon: "tag" | ||
color: "blue" | ||
... |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "gradle" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 20 |
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,33 @@ | ||
--- | ||
name: Publish | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 8 | ||
cache: 'gradle' | ||
- name: build publish | ||
run: ./gradlew clean build publish --info --stacktrace | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }} | ||
- name: Publish Test Report | ||
if: ${{ always() }} | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
... |
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,48 @@ | ||
--- | ||
name: CI | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches-ignore: | ||
- main | ||
jobs: | ||
ci-build: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
java: [ 8, 11, 17 ] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: ${{ matrix.java }} | ||
cache: 'gradle' | ||
- name: Install Docker on macOS | ||
if: matrix.os == 'macos-latest' | ||
uses: ./.github/actions/docker-install-macos | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: docker version | ||
run: docker version | ||
- name: docker info | ||
run: docker info | ||
- name: java version | ||
run: java -version | ||
- name: clean build | ||
run: ./gradlew clean build --info --stacktrace | ||
- name: Publish Test Report | ||
if: ${{ always() }} | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
... |
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,41 @@ | ||
--- | ||
name: Release | ||
on: | ||
release: | ||
types: | ||
- released | ||
# - published | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 8 | ||
cache: 'gradle' | ||
- name: Set artifact version | ||
run: | | ||
echo "RELEASE_VERSION=$(echo '${{ github.event.release.tag_name }}' | sed -e s/^v//)" >> $GITHUB_ENV | ||
- name: build publish | ||
run: ./gradlew clean build publish closeAndReleaseStagingRepository --info --stacktrace -Pversion="${{ env.RELEASE_VERSION }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
- name: Publish Test Report | ||
if: ${{ always() }} | ||
uses: scacap/action-surefire-report@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
... |
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 @@ | ||
name: Update Gradle Wrapper | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# "weekly" https://crontab.guru/every-week | ||
- cron: "0 0 * * 0" | ||
|
||
jobs: | ||
update-gradle-wrapper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Update Gradle Wrapper | ||
uses: gradle-update/update-gradle-wrapper-action@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: gradle/wrapper-validation-action@v1 |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
.gradle | ||
build | ||
.idea | ||
*.iml | ||
build/ | ||
classes/ | ||
.DS_Store | ||
out/ | ||
*.settings | ||
*.project | ||
*bin/ | ||
*.classpath |
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,15 @@ | ||
## Publishing | ||
|
||
Packages are automatically published from the `main` branch to the GitHub Package Registry. | ||
Manually cut releases will be published to both GitHub Package Registry and Maven Central. | ||
|
||
## Release Workflow | ||
|
||
There are multiple GitHub Action Workflows for the different steps in the package's lifecycle: | ||
|
||
- CI: Builds and checks incoming changes on a pull request | ||
- triggered on every push to a non-default branch | ||
- CD: Publishes the Gradle artifacts to GitHub Package Registry | ||
- triggered only on pushes to the default branch | ||
- Release: Publishes Gradle artifacts to Sonatype and releases them to Maven Central | ||
- triggered on a published GitHub release using the underlying tag as artifact version, e.g. via `git tag -m "$MESSAGE" v$(date +"%Y-%m-%dT%H-%M-%S")` |
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,66 @@ | ||
import java.text.SimpleDateFormat | ||
import java.util.* | ||
|
||
rootProject.extra.set("artifactVersion", SimpleDateFormat("yyyy-MM-dd\'T\'HH-mm-ss").format(Date())) | ||
|
||
plugins { | ||
id("maven-publish") | ||
id("com.github.ben-manes.versions") version "0.42.0" | ||
id("net.ossindex.audit") version "0.4.11" | ||
id("io.freefair.maven-central.validate-poms") version "6.4.1" | ||
id("io.github.gradle-nexus.publish-plugin") version "1.1.0" | ||
} | ||
|
||
val dependencyVersions = listOf( | ||
"org.jetbrains:annotations:23.0.0" | ||
) | ||
|
||
val dependencyVersionsByGroup = mapOf<String, String>( | ||
) | ||
|
||
subprojects { | ||
repositories { | ||
// mavenLocal() | ||
// fun findProperty(s: String) = project.findProperty(s) as String? | ||
// maven { | ||
// name = "github" | ||
// setUrl("https://maven.pkg.github.com/docker-client/*") | ||
// credentials { | ||
// username = System.getenv("PACKAGE_REGISTRY_USER") ?: findProperty("github.package-registry.username") | ||
// password = System.getenv("PACKAGE_REGISTRY_TOKEN") ?: findProperty("github.package-registry.password") | ||
// } | ||
// } | ||
mavenCentral() | ||
} | ||
} | ||
|
||
allprojects { | ||
configurations.all { | ||
resolutionStrategy { | ||
failOnVersionConflict() | ||
force(dependencyVersions) | ||
eachDependency { | ||
val forcedVersion = dependencyVersionsByGroup[requested.group] | ||
if (forcedVersion != null) { | ||
useVersion(forcedVersion) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun findProperty(s: String) = project.findProperty(s) as String? | ||
|
||
val isSnapshot = project.version == "unspecified" | ||
nexusPublishing { | ||
repositories { | ||
if (!isSnapshot) { | ||
sonatype { | ||
// 'sonatype' is pre-configured for Sonatype Nexus (OSSRH) which is used for The Central Repository | ||
stagingProfileId.set(System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: findProperty("sonatype.staging.profile.id")) //can reduce execution time by even 10 seconds | ||
username.set(System.getenv("SONATYPE_USERNAME") ?: findProperty("sonatype.username")) | ||
password.set(System.getenv("SONATYPE_PASSWORD") ?: findProperty("sonatype.password")) | ||
} | ||
} | ||
} | ||
} |
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,14 @@ | ||
org.gradle.daemon=true | ||
|
||
group=de.gesellix | ||
|
||
github.package-registry.owner=docker-client | ||
github.package-registry.repository=docker-registry | ||
github.package-registry.username= | ||
github.package-registry.password= | ||
|
||
sonatype.snapshot.url=https://oss.sonatype.org/content/repositories/snapshots/ | ||
sonatype.staging.url=https://oss.sonatype.org/service/local/staging/deploy/maven2/ | ||
sonatype.staging.profile.id= | ||
sonatype.username= | ||
sonatype.password= |
Oops, something went wrong.