File tree Expand file tree Collapse file tree
src/main/groovy/com/rundeck/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 git-plugin jar
29+ uses : actions/upload-artifact@v1.0.0
30+ with :
31+ # Artifact name
32+ name : Grails-Plugin-${{ steps.get_version.outputs.VERSION }}
33+ # Directory containing files to upload
34+ path : build/libs/git-plugin-${{ steps.get_version.outputs.VERSION }}.jar
Original file line number Diff line number Diff line change 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/create-release@v1.0.0
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/git-plugin-${{ steps.get_version.outputs.VERSION }}.jar
45+ asset_name : git-plugin-${{ steps.get_version.outputs.VERSION }}.jar
46+ asset_content_type : application/octet-stream
47+
Original file line number Diff line number Diff line change 11.gradle
22.idea
33build
4- gradle
Original file line number Diff line number Diff line change 11plugins {
2- id ' pl.allegro.tech.build.axion-release' version ' 1.3.2 '
2+ id ' pl.allegro.tech.build.axion-release' version ' 1.11.0 '
33}
44
55group ' com.rundeck'
@@ -10,7 +10,7 @@ ext.pluginName = 'Git Plugin'
1010ext. pluginDescription = ' This is a git plugin (based on Jgit) which contain a Resource model and worflow steps'
1111
1212scmVersion {
13- ignoreUncommittedChanges = false
13+ ignoreUncommittedChanges = true
1414 tag {
1515 prefix = ' '
1616 versionSeparator = ' '
@@ -48,6 +48,7 @@ dependencies {
4848 testCompile group : ' junit' , name : ' junit' , version : ' 4.12'
4949
5050 compile group : ' org.rundeck' , name : ' rundeck-core' , version : ' 2.11.4'
51+ compile ' org.slf4j:slf4j-api:1.7.30'
5152
5253 pluginLibs( ' org.eclipse.jgit:org.eclipse.jgit:4.4.0.201606070830-r' ) {
5354 exclude module : ' slf4j-api'
Original file line number Diff line number Diff line change 1+ distributionBase =GRADLE_USER_HOME
2+ distributionPath =wrapper/dists
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.8-bin.zip
4+ zipStoreBase =GRADLE_USER_HOME
5+ zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import com.dtolabs.rundeck.core.plugins.Plugin
66import com.dtolabs.rundeck.core.plugins.configuration.Describable
77import com.dtolabs.rundeck.core.plugins.configuration.Description
88import com.dtolabs.rundeck.core.plugins.configuration.PropertyUtil
9- import com.dtolabs.rundeck.plugins.PluginLogger
109import com.dtolabs.rundeck.plugins.ServiceNameConstants
1110import com.dtolabs.rundeck.core.plugins.configuration.PropertyScope
1211import com.dtolabs.rundeck.plugins.descriptions.PluginDescription
Original file line number Diff line number Diff line change 11package com.rundeck.plugin
22
33import com.rundeck.plugin.util.PluginSshSessionFactory
4- import org.apache.log4j.Logger
54import org.eclipse.jgit.api.Git
65import org.eclipse.jgit.api.PullResult
76import org.eclipse.jgit.api.TransportCommand
@@ -16,12 +15,14 @@ import java.nio.file.Files
1615import java.nio.file.Path
1716import java.nio.file.Paths
1817
18+ import org.slf4j.Logger
19+ import org.slf4j.LoggerFactory
1920/**
2021 * Created by luistoledo on 12/20/17.
2122 */
2223class GitManager {
2324
24- static Logger logger = Logger . getLogger(GitManager . class);
25+ private static final Logger logger = LoggerFactory . getLogger(GitManager . class);
2526
2627 public static final String REMOTE_NAME = " origin"
2728 Git git
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import com.dtolabs.rundeck.core.resources.format.ResourceFormatParser
1010import com.dtolabs.rundeck.core.resources.format.ResourceFormatParserException
1111import com.dtolabs.rundeck.core.resources.format.UnsupportedFormatException
1212import com.dtolabs.utils.Streams
13- import org.apache.log4j.Logger
1413
1514
1615/**
You can’t perform that action at this time.
0 commit comments