-
Notifications
You must be signed in to change notification settings - Fork 18
Grails 7 Migration - Rundeck 6.0 Compatibility #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5b345d2
Update for Grails 7 compatibility
fdevans 622281f
Fix scmVersion prefix for JitPack compatibility
fdevans 9574bfd
Remove scmVersion.version assignment - use only hardcoded version
fdevans d4459bc
Remove scmVersion plugin entirely - using only hardcoded version for …
fdevans e1d97fe
Bump version to 1.4.12-grails7-upgrade-test to bypass JitPack cache
fdevans cdcfce8
Migrate to PackageCloud: restore Axion, change groupId to com.rundeck…
fdevans 53fd2d4
Migrate to PackageCloud: restore Axion, self-contained build (aws-s3-…
fdevans 62b6296
Modernize GitHub Actions workflows for Node.js 24 compatibility
fdevans d1782b5
Fix setup-java@v4 missing required distribution parameter
fdevans 7a0fe96
Standardize Gradle version to 8.14.3
fdevans 99ff93a
Fix YAML indentation for distribution parameter
fdevans a41adc0
Fix YAML indentation and update Gradle wrapper scripts
fdevans bec3201
Fixup build
fdevans f965674
Delete jitpack.yml
fdevans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,48 +1,42 @@ | ||
| on: | ||
| push: | ||
| # Sequence of patterns matched against refs/tags | ||
| tags: | ||
| - '*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
| - '*.*.*' | ||
|
|
||
| name: Create Release | ||
| name: Publish Release | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Upload Release Asset | ||
| name: Publish Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up JDK 1.11 | ||
| uses: actions/setup-java@v1 | ||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: 11 | ||
| java-version: '17' | ||
| distribution: 'zulu' | ||
| - name: Build with Gradle | ||
| run: ./gradlew build | ||
| - name: Get Release Version | ||
| id: get_version | ||
| run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION | ||
| run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
| - name: Create Release | ||
| id: create_release | ||
| uses: actions/create-release@v1.0.0 | ||
| run: | | ||
| gh release create \ | ||
| --generate-notes \ | ||
| --title 'Release ${{ steps.get_version.outputs.VERSION }}' \ | ||
| ${{ github.ref_name }} \ | ||
| build/libs/docker-${{ steps.get_version.outputs.VERSION }}.zip | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| tag_name: ${{ github.ref }} | ||
| release_name: Release ${{ steps.get_version.outputs.VERSION }} | ||
| draft: false | ||
| prerelease: false | ||
|
|
||
| - name: Upload Plugin (zip) | ||
| id: upload-release-asset | ||
| uses: actions/upload-release-asset@v1 | ||
| - name: Publish to Maven Central | ||
| run: ./gradlew -PsigningKey=${SIGNING_KEY_B64} -PsigningPassword=${SIGNING_PASSWORD} -PsonatypeUsername=${SONATYPE_USERNAME} -PsonatypePassword=${SONATYPE_PASSWORD} publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
| asset_path: ./build/libs/docker-${{ steps.get_version.outputs.VERSION }}.zip | ||
| asset_name: docker-${{ steps.get_version.outputs.VERSION }}.zip | ||
| asset_content_type: application/zip | ||
|
|
||
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
| SIGNING_KEY_B64: ${{ secrets.SIGNING_KEY_B64 }} | ||
| SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} |
This file contains hidden or 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,31 +1,116 @@ | ||
| buildscript { | ||
| repositories { | ||
| mavenCentral() | ||
| } | ||
| } | ||
| plugins { | ||
| id 'pl.allegro.tech.build.axion-release' version '1.17.2' | ||
| id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' | ||
| } | ||
|
|
||
| ext.pluginName = 'Docker Plugin' | ||
| ext.pluginDescription = "Docker manager plugin" | ||
| ext.sopsCopyright = "© 2022, Rundeck, Inc." | ||
| ext.sopsUrl = "http://rundeck.com" | ||
| ext.buildDateString=new Date().format("yyyy-MM-dd'T'HH:mm:ssX") | ||
| ext.archivesBaseName = "docker" | ||
| ext.pluginBaseFolder = "." | ||
| group = 'org.rundeck.plugins' | ||
|
|
||
| scmVersion { | ||
| ignoreUncommittedChanges = true | ||
| ignoreUncommittedChanges = false | ||
| tag { | ||
| prefix = '' | ||
| prefix = '' // NO "v" prefix - see PLUGIN_TAGGING_ARCHITECTURE.md | ||
| versionSeparator = '' | ||
| def origDeserialize=deserialize | ||
| } | ||
| } | ||
|
|
||
| version = scmVersion.version // Dynamic version from git tag | ||
|
|
||
| // Plugin metadata | ||
| ext { | ||
| pluginName = 'Docker Plugin' | ||
| pluginDescription = "Docker manager plugin" | ||
| sopsCopyright = "© 2022, Rundeck, Inc." | ||
| sopsUrl = "http://rundeck.com" | ||
| buildDateString = new Date().format("yyyy-MM-dd'T'HH:mm:ssX") | ||
| archivesBaseName = "docker" | ||
| pluginBaseFolder = "." | ||
| } | ||
|
|
||
| ext.archiveFilename = "${archivesBaseName}-${version}" | ||
| ext.publishName = "Docker Plugin ${project.version}" | ||
| ext.githubSlug = 'rundeck-plugins/docker' | ||
| ext.developers = [ | ||
| [id: 'gschueler', name: 'Greg Schueler', email: 'greg@rundeck.com'] | ||
| ] | ||
|
|
||
| import org.apache.tools.ant.filters.ReplaceTokens | ||
|
|
||
| // Set default tasks | ||
| defaultTasks('clean', 'build', 'pluginZip') | ||
|
|
||
| task pluginZip(type: Jar) { | ||
| archiveBaseName = archivesBaseName | ||
| archiveVersion = version | ||
| archiveClassifier = '' | ||
| archiveExtension = 'zip' | ||
| destinationDirectory = layout.buildDirectory.dir('libs') | ||
|
|
||
| from(layout.buildDirectory.dir('zip-contents')) { | ||
| include('*.yaml') | ||
| include('resources/**') | ||
| include('contents/*') | ||
| into("${archivesBaseName}-" + project.version.toString()) | ||
| } | ||
|
|
||
| manifest { | ||
| attributes( | ||
| 'Rundeck-Plugin-Name': pluginName, | ||
| 'Rundeck-Plugin-Description': pluginDescription, | ||
| 'Rundeck-Plugin-Archive': 'true', | ||
| 'Rundeck-Plugin-File-Version': project.version.toString(), | ||
| 'Rundeck-Plugin-Author': sopsCopyright, | ||
| 'Rundeck-Plugin-URL': sopsUrl, | ||
| 'Rundeck-Plugin-Date': buildDateString | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| project.version = scmVersion.version | ||
| ext.archiveFilename = ext.archivesBaseName + '-' + version | ||
| pluginZip.doFirst { | ||
| def assetsMap = new Properties() | ||
| def tokens = assetsMap + [ | ||
| version : project.version.toString(), | ||
| date : new Date().format("yyyy-MM-dd'T'HH:mm:ssX"), | ||
| author : sopsCopyright, | ||
| url : sopsUrl, | ||
| title : pluginName, | ||
| description: pluginDescription, | ||
| name : archivesBaseName, | ||
| ] | ||
|
|
||
| copy { | ||
| from(file('resources')) { | ||
| include('**/*') | ||
| into('resources') | ||
| } | ||
|
|
||
| from(file('contents')) { | ||
| into('contents') | ||
| } | ||
|
|
||
| from('plugin.yaml') { | ||
| filter(ReplaceTokens, tokens: tokens) | ||
| exclude('**/*.png') | ||
| } | ||
|
|
||
| into(layout.buildDirectory.dir('zip-contents')) | ||
| } | ||
| } | ||
|
|
||
| nexusPublishing { | ||
| packageGroup = 'org.rundeck.plugins' | ||
| repositories { | ||
| sonatype { | ||
| nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) | ||
| snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| apply from: "${rootDir}/gradle/publishing.gradle" | ||
|
|
||
| tasks.named('build').configure { dependsOn(pluginZip) } | ||
|
|
||
| task install(dependsOn: ['build', 'publishToMavenLocal']) { | ||
| } | ||
|
|
||
| apply from: 'https://raw.githubusercontent.com/rundeck-plugins/build-zip/gradle-5.6/build.gradle' | ||
| tasks.named('clean').configure { delete('build') } |
This file contains hidden or 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,80 @@ | ||
| /** | ||
| * Zip-based Rundeck plugin publication for Maven Central (artifact uploaded as type jar). | ||
| * Requires: ext.publishName, ext.githubSlug, ext.developers; task pluginZip | ||
| */ | ||
| apply plugin: 'maven-publish' | ||
| apply plugin: 'signing' | ||
|
|
||
| publishing { | ||
| publications { | ||
| mavenZip(MavenPublication) { | ||
| groupId = project.group.toString() | ||
| artifactId = 'docker' | ||
| version = project.version.toString() | ||
|
|
||
| artifact(tasks.named('pluginZip')) { | ||
| extension = 'jar' | ||
| } | ||
|
|
||
| pom { | ||
| packaging = 'jar' | ||
| name = publishName | ||
| description = project.ext.hasProperty('publishDescription') ? project.ext.publishDescription : | ||
| project.description ?: publishName | ||
| url = "https://github.com/${githubSlug}" | ||
| licenses { | ||
| license { | ||
| name = 'The Apache Software License, Version 2.0' | ||
| url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
| distribution = 'repo' | ||
| } | ||
| } | ||
| scm { | ||
| url = "https://github.com/${githubSlug}" | ||
| connection = "scm:git:git@github.com/${githubSlug}.git" | ||
| developerConnection = "scm:git:git@github.com:${githubSlug}.git" | ||
| } | ||
| if (project.ext.developers) { | ||
| developers { | ||
| project.ext.developers.each { dev -> | ||
| developer { | ||
| id = dev.id | ||
| name = dev.name | ||
| email = dev.email | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| repositories { | ||
| def pkgcldWriteToken = System.getenv("PKGCLD_WRITE_TOKEN") ?: project.findProperty("pkgcldWriteToken") | ||
| if (pkgcldWriteToken) { | ||
| maven { | ||
| name = "PackageCloudTest" | ||
| url = uri("https://packagecloud.io/pagerduty/rundeckpro-test/maven2") | ||
| authentication { | ||
| header(HttpHeaderAuthentication) | ||
| } | ||
| credentials(HttpHeaderCredentials) { | ||
| name = "Authorization" | ||
| value = "Bearer " + pkgcldWriteToken | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| def base64Decode = { String prop -> | ||
| project.findProperty(prop) ? | ||
| new String(Base64.getDecoder().decode(project.findProperty(prop).toString())).trim() : | ||
| null | ||
| } | ||
|
|
||
| if (project.hasProperty('signingKey') && project.hasProperty('signingPassword')) { | ||
| signing { | ||
| useInMemoryPgpKeys(base64Decode("signingKey"), project.signingPassword) | ||
| sign(publishing.publications) | ||
| } | ||
| } |
Binary file not shown.
This file contains hidden or 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,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.