Skip to content

Commit

Permalink
Merge pull request #352 from rundeck-plugins/use-ansible-vault
Browse files Browse the repository at this point in the history
RUN-2232: Use ansible vault for temporary files
  • Loading branch information
ltamaster authored Mar 26, 2024
2 parents 4228d5a + aa98226 commit 6365f98
Show file tree
Hide file tree
Showing 54 changed files with 2,841 additions and 1,206 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!docker
!src/test/resources/docker
!build/libs
1 change: 0 additions & 1 deletion .env

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ jobs:
- 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
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Copy Artifact for integration test
run: ./gradlew :functional-test:copyPluginArtifact
- name: Run integration Test
run: ./gradlew :functional-test:functionalTest
- name: Get Release Version
id: get_version
run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo ::set-output name=VERSION::$VERSION
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set up JDK 1.8
- name: set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Build with Gradle
run: ./gradlew build
- name: Get Release Version
Expand Down
48 changes: 0 additions & 48 deletions Dockerfile

This file was deleted.

20 changes: 14 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ ext.pluginClassNames = [

apply plugin: 'java'
apply plugin: 'groovy'
sourceCompatibility = 1.8
sourceCompatibility = 1.11

scmVersion {
ignoreUncommittedChanges = true
ignoreUncommittedChanges = false
tag {
prefix = 'v'
versionSeparator = ''
Expand All @@ -47,11 +47,19 @@ configurations {

dependencies {
pluginLibs 'com.google.code.gson:gson:2.10.1'
implementation('org.rundeck:rundeck-core:4.17.2-rc1-20231025')
implementation 'org.codehaus.groovy:groovy-all:3.0.9'
implementation('org.rundeck:rundeck-core:5.1.1-20240305')
implementation 'org.codehaus.groovy:groovy-all:3.0.15'
pluginLibs group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.16.1'
pluginLibs group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.16.1'

compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'

testCompileOnly 'org.projectlombok:lombok:1.18.30'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.30'

testImplementation "org.spockframework:spock-core:2.1-groovy-3.0"

testImplementation platform("org.spockframework:spock-bom:2.0-groovy-3.0")
testImplementation "org.spockframework:spock-core"
}

tasks.withType(Test).configureEach {
Expand Down
2 changes: 0 additions & 2 deletions docker/inventory.ini

This file was deleted.

16 changes: 0 additions & 16 deletions docker/node/init.sh

This file was deleted.

16 changes: 0 additions & 16 deletions docker/project.properties

This file was deleted.

5 changes: 5 additions & 0 deletions functional-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
src/test/resources/docker/keys/id_rsa
src/test/resources/docker/keys/id_rsa.pub
src/test/resources/docker/keys/id_rsa_passphrase
src/test/resources/docker/keys/id_rsa_passphrase.pub
src/test/resources/docker/rundeck/plugins/*.jar
42 changes: 42 additions & 0 deletions functional-test/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
id 'groovy'
}

repositories {
mavenLocal()
mavenCentral()
}


group = 'com.github.rundeck-plugins'

configurations {
configurations {
instrumentedClasspath {
canBeConsumed = false
}
}
}
dependencies {
testImplementation "org.spockframework:spock-core:2.1-groovy-3.0"

testImplementation "org.testcontainers:testcontainers:1.17.2"
testImplementation "org.testcontainers:spock:1.17.2"
testImplementation group: 'org.rundeck.api', name: 'rd-api-client', version: '2.0.8'

testImplementation group: 'com.jcraft', name: 'jsch', version: '0.1.55'

}

tasks.register('functionalTest', Test) {
useJUnitPlatform()
systemProperty('RUNDECK_TEST_IMAGE', "rundeck/rundeck:5.1.1")
description = "Run Ansible integration tests"
}

tasks.register('copyPluginArtifact', Copy) {
from("$rootDir/build/libs/"){
include '**/*.jar'
}
into "$projectDir/src/test/resources/docker/rundeck/plugins"
}
Loading

0 comments on commit 6365f98

Please sign in to comment.