diff --git a/README.md b/README.md index 0f0a78f..1b60315 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ If the version number is not provided then the most recent version of the plugin steps: - label: "Triggering pipelines" plugins: - - glydways/monorepo-diff#v2.5.20: + - glydways/monorepo-diff#v2.5.10: diff: "git diff --name-only HEAD~1" watch: - path: "bar-service/" @@ -38,7 +38,7 @@ steps: steps: - label: "Triggering pipelines" plugins: - - glydways/monorepo-diff#v2.5.20: + - glydways/monorepo-diff#v2.5.10: diff: "git diff --name-only $(head -n 1 last_successful_build)" interpolation: false env: @@ -162,7 +162,7 @@ Add `log_level` property to set the log level. Supported log levels are `debug` steps: - label: "Triggering pipelines" plugins: - - glydways/monorepo-diff#v2.5.20: + - glydways/monorepo-diff#v2.5.10: diff: "git diff --name-only HEAD~1" log_level: "debug" # defaults to "info" watch: @@ -238,7 +238,7 @@ hooks: steps: - label: "Triggering pipelines" plugins: - - glydways/monorepo-diff#v2.5.20: + - glydways/monorepo-diff#v2.5.10: diff: "git diff --name-only HEAD~1" watch: - path: app/cms/ diff --git a/pipeline.go b/pipeline.go index f16e65b..6b2b3e9 100644 --- a/pipeline.go +++ b/pipeline.go @@ -163,44 +163,28 @@ func generatePipeline(steps []Step, plugin Plugin) (*os.File, error) { } yamlSteps := make([]yaml.Marshaler, len(steps)) - log.Debug("1") - log.Debug(yamlSteps) for i, step := range steps { yamlSteps[i] = step } - log.Debug("2") - log.Debug(yamlSteps) - if plugin.Wait { yamlSteps = append(yamlSteps, WaitStep{}) } - log.Debug("3") - log.Debug(yamlSteps) - for _, cmd := range plugin.Hooks { yamlSteps = append(yamlSteps, Step{Command: cmd.Command}) } - log.Debug("4") - log.Debug(yamlSteps) yamlNotify := make([]yaml.Marshaler, len(plugin.Notify)) for i, n := range plugin.Notify { yamlNotify[i] = n } - log.Debug("5") - log.Debug(yamlSteps) - pipeline := map[string][]yaml.Marshaler{ "steps": yamlSteps, } - log.Debug("6") - log.Debug(yamlSteps) - if len(yamlNotify) > 0 { pipeline["notify"] = yamlNotify } diff --git a/plugin.go b/plugin.go index 4d29c6c..786a4c2 100644 --- a/plugin.go +++ b/plugin.go @@ -113,13 +113,8 @@ func (plugin *Plugin) UnmarshalJSON(data []byte) error { _ = json.Unmarshal(data, def) - log.Info("def") - log.Info(def) *plugin = Plugin(*def) - log.Info("plugin") - log.Info(plugin) - parseResult, err := parseEnv(plugin.RawEnv) if err != nil { return errors.New("failed to parse plugin configuration") @@ -163,30 +158,21 @@ func initializePlugin(data string) (Plugin, error) { var pluginConfigs []map[string]json.RawMessage - log.Info("rawmessage") - log.Info(pluginConfigs) if err := json.Unmarshal([]byte(data), &pluginConfigs); err != nil { log.Debug(err) return Plugin{}, errors.New("failed to parse plugin configuration") } - log.Info("after unmarshal") - log.Info(pluginConfigs) - for _, p := range pluginConfigs { for key, pluginConfig := range p { if strings.HasPrefix(key, pluginName) { var plugin Plugin - log.Info("PluginConfig") - log.Info(pluginConfig) if err := json.Unmarshal(pluginConfig, &plugin); err != nil { log.Debug(err) return Plugin{}, errors.New("failed to parse plugin configuration") } - log.Info("plugin after unmarshal") - log.Info(plugin) return plugin, nil } }