forked from tomzo/gocd-yaml-config-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve alias support with nested tasks and a common section (tomzo#32)
- Loading branch information
Sandro Heinzelmann
committed
Sep 15, 2017
1 parent
0684ba4
commit eb8c445
Showing
11 changed files
with
243 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"target_version": 1, | ||
"environments": [], | ||
"pipelines": [{ | ||
"name": "pipe1", | ||
"group": "aliases", | ||
"materials": [{ | ||
"name": "mygit", | ||
"type": "git", | ||
"url": "http://my.example.org/mygit.git", | ||
"branch": "ci" | ||
}], | ||
"stages": [{ | ||
"name": "prepare", | ||
"jobs": [{ | ||
"name": "prepare", | ||
"tasks": [{ | ||
"type": "exec", | ||
"arguments": ["hello world"], | ||
"command": "prepare" | ||
}] | ||
}] | ||
}, { | ||
"name": "build", | ||
"jobs": [{ | ||
"name": "build", | ||
"tasks": [{ | ||
"type": "exec", | ||
"command": "init" | ||
}, { | ||
"type": "exec", | ||
"arguments": ["VERBOSE=true"], | ||
"command": "make" | ||
}] | ||
}] | ||
}, { | ||
"name": "test", | ||
"jobs": [{ | ||
"name": "test", | ||
"tasks": [{ | ||
"type": "exec", | ||
"command": "init" | ||
}, { | ||
"type": "exec", | ||
"arguments": ["VERBOSE=true"], | ||
"command": "make" | ||
}, { | ||
"type": "exec", | ||
"command": "test_unit" | ||
}, { | ||
"type": "exec", | ||
"command": "test_integration" | ||
}] | ||
}] | ||
}], | ||
"location": "aliases.gocd.yaml" | ||
}], | ||
"errors": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# aliases.gocd.yaml | ||
common: # aliases section | ||
scalar_alias: &scalar_alias "hello world" | ||
task_list_alias: &task_list_alias | ||
- exec: | ||
command: init | ||
- exec: | ||
command: make | ||
arguments: | ||
- "VERBOSE=true" | ||
pipelines: | ||
pipe1: | ||
group: aliases | ||
materials: | ||
mygit: | ||
git: http://my.example.org/mygit.git | ||
branch: ci | ||
stages: | ||
- prepare: | ||
jobs: | ||
prepare: | ||
tasks: | ||
- exec: | ||
command: prepare | ||
arguments: # use of scalar alias | ||
- *scalar_alias | ||
- build: | ||
jobs: | ||
build: | ||
tasks: *task_list_alias # use of task list alias as the full list | ||
- test: | ||
jobs: | ||
test: | ||
tasks: | ||
- *task_list_alias # use of task list alias as a partial list with more added | ||
- exec: | ||
command: test_unit | ||
- exec: | ||
command: test_integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "test", | ||
"tasks": [ | ||
{ | ||
"type": "exec", | ||
"arguments": ["clean"], | ||
"command": "./gradlew" | ||
}, | ||
{ | ||
"type": "exec", | ||
"arguments": ["assemble"], | ||
"command": "./gradlew" | ||
}, | ||
{ | ||
"type": "exec", | ||
"arguments": ["test"], | ||
"command": "./gradlew" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
test: | ||
tasks: | ||
- | ||
- exec: | ||
command: ./gradlew | ||
arguments: | ||
- clean | ||
- exec: | ||
command: ./gradlew | ||
arguments: | ||
- assemble | ||
- exec: | ||
command: ./gradlew | ||
arguments: | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
common: | ||
some_string: &alias1 hello world | ||
environments: | ||
first: | ||
pipelines: | ||
pipe1: |