Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Fetch Tags
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
if: "!contains(github.ref, 'refs/tags')"
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- 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: Upload git-plugin jar
uses: actions/upload-artifact@v1.0.0
uses: actions/upload-artifact@v4
with:
# Artifact name
name: git-resource-model-${{ steps.get_version.outputs.VERSION }}
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,34 @@ jobs:
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.8
uses: actions/setup-java@v1

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: '11'
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/git-resource-model-${{ steps.get_version.outputs.VERSION }}.jar
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 Release Asset (jar)
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 }}
asset_path: build/libs/git-resource-model-${{ steps.get_version.outputs.VERSION }}.jar
asset_name: git-resource-model-${{ steps.get_version.outputs.VERSION }}.jar
asset_content_type: application/octet-stream

SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY_B64: ${{ secrets.SIGNING_KEY_B64 }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
49 changes: 22 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.11.0'
id 'pl.allegro.tech.build.axion-release' version '1.18.18'
id 'java'
}

group 'com.rundeck'
Expand All @@ -9,23 +10,18 @@ ext.pluginClassNames='com.rundeck.plugin.GitResourceModelFactory'
ext.pluginName = 'Git Resource Model'
ext.pluginDescription = 'Writable Git Resource Model'

//sourceCompatibility = 1.8
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

scmVersion {
ignoreUncommittedChanges = true
tag {
prefix = ''
versionSeparator = ''
def origDeserialize=deserialize
//apend .0 to satisfy semver if the tag version is only X.Y
deserialize = { config, position, tagName ->
def orig = origDeserialize(config, position, tagName)
if (orig.split('\\.').length < 3) {
orig += ".0"
}
orig
}
}
versionCreator("simple")
}
project.version = scmVersion.version

Expand All @@ -39,29 +35,34 @@ repositories {
configurations {
pluginLibs

compile {
implementation {
extendsFrom pluginLibs
}
}


dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.11'
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'org.codehaus.groovy:groovy-all:3.0.22'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'

implementation group: 'org.rundeck', name: 'rundeck-core', version: '5.10.0-20250312'
implementation 'org.slf4j:slf4j-api:1.7.30'

compile group: 'org.rundeck', name: 'rundeck-core', version: '2.10.1'
compile 'org.slf4j:slf4j-api:1.7.30'
pluginLibs( 'org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.3.202401111512-r') {
exclude module: 'slf4j-api'
exclude group: 'org.bouncycastle'
}

pluginLibs( 'org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
pluginLibs('org.eclipse.jgit:org.eclipse.jgit:6.6.1.202309021850-r') {
exclude module: 'slf4j-api'
exclude module: 'jsch'
exclude module: 'commons-logging'
}

testCompile "org.codehaus.groovy:groovy-all:2.3.7"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
testCompile "cglib:cglib-nodep:2.2.2"
testCompile 'org.objenesis:objenesis:1.4'
testImplementation "org.codehaus.groovy:groovy-all:3.0.22"
testImplementation "org.spockframework:spock-core:2.0-groovy-3.0"
testImplementation "cglib:cglib-nodep:3.3.0"
testImplementation 'org.objenesis:objenesis:1.4'
}


Expand All @@ -83,9 +84,3 @@ jar {
dependsOn(copyToLib)
}


task wrapper(type: Wrapper) {
gradleVersion = '3.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Dec 18 16:14:59 CLST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
8 changes: 4 additions & 4 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.dtolabs.rundeck.core.common.INodeSet
import com.dtolabs.rundeck.core.resources.format.ResourceFormatParser
import com.dtolabs.rundeck.core.resources.format.ResourceFormatParserService
import spock.lang.Specification
import org.apache.log4j.Logger

/**
* Created by luistoledo on 12/22/17.
Expand Down