--- a/ChangeLog Sun Oct 27 03:41:33 2019 -0500
+++ b/ChangeLog Sun Oct 27 04:19:03 2019 -0500
@@ -37,6 +37,8 @@
replicated by plan/stage environment variables.
* Removed the deprecated always attribute on stages.
* Added the convey/fail task which is good for testing.
+ * Removed deprecated tasks formats. All tasks types must be defined via the * Write warning, error, and fatal log messages to stderr. Fixed #156
--- a/loaders/convey/tasks.go Sun Oct 27 03:41:33 2019 -0500
+++ b/loaders/convey/tasks.go Sun Oct 27 04:19:03 2019 -0500
@@ -18,7 +18,6 @@
"github.com/go-yaml/yaml"
log "github.com/sirupsen/logrus"
@@ -34,67 +33,17 @@
-func loadLegacyTask(rawEngine, rawType string, logger *log.Entry) (tasks.Task, error) {
- legacyEngine := "docker"
- // there are only two intrinsic tasks, so check them first
- if rawType == "clean" || rawType == "extend" {
- legacyEngine = "convey"
- // figure out the engine
- msg := "the engine attribute is deprecated and will be removed in a future version. Please update to the new type format as this format will be removed in a future version."
- if rawEngine == "intrinsic" {
- msg := "the intrinsic engine is deprecated, using convey instead"
- legacyEngine = rawEngine
- typeName := fmt.Sprintf("%s/%s", legacyEngine, legacyType)
- msgFmt := "converted deprecated task format {engine: '%s', type: '%s'} to type %s. Please update to the new type format as this format will be removed in a future version."
- logger.Warnf(msgFmt, rawEngine, rawType, typeName)
- task, ok := cConfig.TasksMap[typeName]
- return nil, fmt.Errorf(
- "failed to find task with engine '%s' and type '%s'",
func loadTask(name string, yamlTask yaml.MapSlice, logger *log.Entry, disableDeprecated bool) (tasks.Task, error) {
- // figure out the engine and type for the task
// task is a yaml.MapSlice since we can't unmarshal it into the proper data
// structure right away, so we have to walk it and grab the attributes
for _, item := range yamlTask {
- switch item.Key.(string) {
- rawEngine = item.Value.(string)
- rawType = item.Value.(string)
+ if key, ok := item.Key.(string); ok && key == "type" { + if value, ok := item.Value.(string); ok { @@ -116,18 +65,7 @@
- // TODO remove when the old format for task types is removed.
- // if deprecated tasks are disabled, just bomb out
- if disableDeprecated || strings.ContainsRune(rawType, '/') {
- return nil, fmt.Errorf("task '%s' not found", rawType)
- rawTask, err := loadLegacyTask(rawEngine, rawType, logger)
+ return nil, fmt.Errorf("task '%s' not found", rawType) --- a/tests/tasks-types.yml Sun Oct 27 03:41:33 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-# This file is just to test all the different ways that a task can be defined
- # engine: implicit: docker
- # engine: implict: docker
- - echo "implicit-engine"