Skip to content

Commit

Permalink
Using plugin-base:0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kritika-singh3 committed May 3, 2019
1 parent 8364082 commit 4c62c3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gocd-file-based-secrets-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ configurations {
}

dependencies {
compile group: 'com.github.bdpiparva.plugin.base', name: 'gocd-plugin-base', version: '0.0.1'
compile group: 'com.github.bdpiparva.plugin.base', name: 'gocd-plugin-base', version: '0.0.3'
compileOnly group: 'cd.go.plugin', name: 'go-plugin-api', version: '18.9.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
compile project(':db')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,28 @@

import cd.go.plugin.secret.filebased.executors.LookupSecretsRequestExecutor;
import cd.go.plugin.secret.filebased.model.SecretsConfiguration;
import com.github.bdpiparva.plugin.base.dispatcher.BaseBuilder;
import com.github.bdpiparva.plugin.base.dispatcher.RequestDispatcher;
import com.github.bdpiparva.plugin.base.dispatcher.RequestDispatcherBuilder;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.thoughtworks.go.plugin.api.GoApplicationAccessor;
import com.thoughtworks.go.plugin.api.GoPlugin;
import com.thoughtworks.go.plugin.api.GoPluginIdentifier;
import com.thoughtworks.go.plugin.api.annotation.Extension;
import com.thoughtworks.go.plugin.api.exceptions.UnhandledRequestTypeException;
import com.thoughtworks.go.plugin.api.logging.Logger;
import com.thoughtworks.go.plugin.api.request.GoPluginApiRequest;
import com.thoughtworks.go.plugin.api.response.GoPluginApiResponse;

import java.util.Arrays;

@Extension
public class FileBasedSecretsPlugin implements GoPlugin {

private RequestDispatcher requestDispatcher;

@Override
public void initializeGoApplicationAccessor(GoApplicationAccessor goApplicationAccessor) {
requestDispatcher = RequestDispatcherBuilder
.forSecret(goApplicationAccessor)
requestDispatcher = BaseBuilder
.forSecrets()
.v1()
.icon("/plugin-icon.svg", "image/svg+xml")
.configMetadata(SecretsConfiguration.class)
.configView("/secrets.template.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import cd.go.plugin.secret.filebased.db.BadSecretException;
import cd.go.plugin.secret.filebased.db.SecretsDatabase;
import cd.go.plugin.secret.filebased.model.LookupSecretRequest;
import com.github.bdpiparva.plugin.base.dispatcher.LookupExecutor;
import com.github.bdpiparva.plugin.base.executors.secrets.LookupExecutor;
import com.thoughtworks.go.plugin.api.response.DefaultGoPluginApiResponse;
import com.thoughtworks.go.plugin.api.response.GoPluginApiResponse;

Expand Down

0 comments on commit 4c62c3f

Please sign in to comment.