Skip to content

Commit ef1703b

Browse files
authored
Merge pull request #18 from rundeck-plugins/replage-log4j
fix log4j error
2 parents 5c76a8d + f5a0fc5 commit ef1703b

File tree

9 files changed

+92
-7
lines changed

9 files changed

+92
-7
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 git-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/git-plugin-${{ steps.get_version.outputs.VERSION }}.jar

.github/workflows/release.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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/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+

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.gradle
22
.idea
33
build
4-
gradle

build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
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

55
group 'com.rundeck'
@@ -10,7 +10,7 @@ ext.pluginName = 'Git Plugin'
1010
ext.pluginDescription = 'This is a git plugin (based on Jgit) which contain a Resource model and worflow steps'
1111

1212
scmVersion {
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'

gradle/wrapper/gradle-wrapper.jar

53.1 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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

src/main/groovy/com/rundeck/plugin/GitCloneWorkflowStep.groovy

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.dtolabs.rundeck.core.plugins.Plugin
66
import com.dtolabs.rundeck.core.plugins.configuration.Describable
77
import com.dtolabs.rundeck.core.plugins.configuration.Description
88
import com.dtolabs.rundeck.core.plugins.configuration.PropertyUtil
9-
import com.dtolabs.rundeck.plugins.PluginLogger
109
import com.dtolabs.rundeck.plugins.ServiceNameConstants
1110
import com.dtolabs.rundeck.core.plugins.configuration.PropertyScope
1211
import com.dtolabs.rundeck.plugins.descriptions.PluginDescription

src/main/groovy/com/rundeck/plugin/GitManager.groovy

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.rundeck.plugin
22

33
import com.rundeck.plugin.util.PluginSshSessionFactory
4-
import org.apache.log4j.Logger
54
import org.eclipse.jgit.api.Git
65
import org.eclipse.jgit.api.PullResult
76
import org.eclipse.jgit.api.TransportCommand
@@ -16,12 +15,14 @@ import java.nio.file.Files
1615
import java.nio.file.Path
1716
import 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
*/
2223
class 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

src/main/groovy/com/rundeck/plugin/GitResourceModel.groovy

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import com.dtolabs.rundeck.core.resources.format.ResourceFormatParser
1010
import com.dtolabs.rundeck.core.resources.format.ResourceFormatParserException
1111
import com.dtolabs.rundeck.core.resources.format.UnsupportedFormatException
1212
import com.dtolabs.utils.Streams
13-
import org.apache.log4j.Logger
1413

1514

1615
/**

0 commit comments

Comments
 (0)