Skip to content

Commit

Permalink
Merge pull request #2 from kdebisschop/enable-continuous-integration
Browse files Browse the repository at this point in the history
Create gradle.yml, enables CI.
  • Loading branch information
kdebisschop authored Dec 24, 2019
2 parents 489d89a + afed929 commit 9a7101a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Java CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew build
33 changes: 33 additions & 0 deletions src/main/java/com/bioraft/rundeck/filelookup/FileLookupUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2019 BioRAFT, Inc. (http://bioraft.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bioraft.rundeck.filelookup;

import com.dtolabs.rundeck.core.Constants;
import com.dtolabs.rundeck.core.dispatcher.ContextView;
import com.dtolabs.rundeck.plugins.step.PluginStepContext;

public class FileLookupUtils {

public static void addOutput(PluginStepContext context, String group, String name, String value, boolean elevate) {
context.getOutputContext().addOutput(group, name, value);
if (elevate) {
String groupName = group + "." + name;
context.getOutputContext().addOutput(ContextView.global(), "export", groupName, value);
context.getLogger().log(Constants.DEBUG_LEVEL, "Elevating to globsal ${export." + groupName + "}.");
}
}

}

0 comments on commit 9a7101a

Please sign in to comment.