Skip to content

Commit 05fc23e

Browse files
authored
Merge pull request #16 from rundeck-plugins/release-process
upgrade gradle
2 parents 1869db0 + 38edddb commit 05fc23e

File tree

4 files changed

+95
-9
lines changed

4 files changed

+95
-9
lines changed

.github/workflows/gradle.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Java CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Get Fetch Tags
15+
run: git -c protocol.version=2 fetch --tags --progress --no-recurse-submodules origin
16+
if: "!contains(github.ref, 'refs/tags')"
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Grant execute permission for gradlew
22+
run: chmod +x gradlew
23+
- name: Build with Gradle
24+
run: ./gradlew build
25+
- name: Get Release Version
26+
id: get_version
27+
run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION
28+
- name: Upload plugin jar
29+
uses: actions/[email protected]
30+
with:
31+
# Artifact name
32+
name: Grails-Plugin-${{ steps.get_version.outputs.VERSION }}
33+
# Directory containing files to upload
34+
path: build/libs/aws-s3-model-source-${{ steps.get_version.outputs.VERSION }}.jar

.github/workflows/release.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Upload Release Asset
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- name: set up JDK 1.8
19+
uses: actions/setup-java@v1
20+
with:
21+
java-version: 1.8
22+
- name: Build with Gradle
23+
run: ./gradlew build
24+
- name: Get Release Version
25+
id: get_version
26+
run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION
27+
- name: Create Release
28+
id: create_release
29+
uses: actions/[email protected]
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
tag_name: ${{ github.ref }}
34+
release_name: Release ${{ steps.get_version.outputs.VERSION }}
35+
draft: false
36+
prerelease: false
37+
- name: Upload Release Asset (jar)
38+
id: upload-release-asset
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }}
44+
asset_path: build/libs/aws-s3-model-source-${{ steps.get_version.outputs.VERSION }}.jar
45+
asset_name: aws-s3-model-source-${{ steps.get_version.outputs.VERSION }}.jar
46+
asset_content_type: application/octet-stream

build.gradle

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.gradle.api.tasks.testing.Test
2+
13
/*
24
* Copyright 2017 Rundeck, Inc. (http://rundeck.com)
35
*
@@ -14,7 +16,7 @@
1416
* limitations under the License.
1517
*/
1618
plugins{
17-
id 'pl.allegro.tech.build.axion-release' version '1.9.3'
19+
id 'pl.allegro.tech.build.axion-release' version '1.13.4'
1820
}
1921

2022

@@ -45,14 +47,14 @@ version scmVersion.version
4547
configurations {
4648
pluginLibs
4749

48-
compile {
50+
implementation {
4951
extendsFrom pluginLibs
5052
}
5153
}
5254

5355
dependencies {
54-
compile group: 'org.rundeck', name: 'rundeck-core', version: '2.10.0'
55-
compile "org.slf4j:slf4j-api:1.7.30"
56+
implementation group: 'org.rundeck', name: 'rundeck-core', version: '4.13.0-20230515'
57+
implementation "org.slf4j:slf4j-api:1.7.30"
5658
pluginLibs ('com.amazonaws:aws-java-sdk-s3:1.12.479') {
5759
exclude group: "com.fasterxml.jackson.core"
5860
exclude group: "com.fasterxml.jackson.dataformat"
@@ -62,10 +64,10 @@ dependencies {
6264
exclude group: "com.fasterxml.jackson.dataformat"
6365
}
6466

65-
testCompile "org.codehaus.groovy:groovy-all:2.3.7"
66-
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
67-
testCompile "cglib:cglib-nodep:2.2.2"
68-
testCompile 'org.objenesis:objenesis:1.4'
67+
testImplementation "org.codehaus.groovy:groovy-all:3.0.9"
68+
testImplementation "org.spockframework:spock-core:2.0-groovy-3.0"
69+
testImplementation "cglib:cglib-nodep:2.2.2"
70+
testImplementation 'org.objenesis:objenesis:1.4'
6971
}
7072

7173
task copyToLib(type: Copy) {
@@ -93,3 +95,7 @@ jar {
9395
}
9496
dependsOn(copyToLib)
9597
}
98+
99+
tasks.withType(Test) {
100+
useJUnitPlatform()
101+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)