diff --git a/example/dinghyfile b/example/dinghyfile index 8b700cd0..998679c9 100644 --- a/example/dinghyfile +++ b/example/dinghyfile @@ -1,37 +1,16 @@ { - "application": "dinghy", - "variables": { - "WaitTime1": 60, - "WaitTime2": 60, - "limit": 1 - }, + "application": "test-dinghy", "pipelines": [ { - "application": "dinghy", + "application": "test-dinghy", "keepWaitingPipelines": false, - "limitConcurrent": {{ variable limit }}, - "name": "Simple", + "limitConcurrent": true, + "name": "test", "stages": [ - {{ module "./wait.stage.module" {Name: "waitTime", Value: 10} }} + {{ module "wait.stage.module" }} ], "triggers": [] }, - {{ module "./simple.pipeline.module" }} + {{ module "simple.pipeline.module" }} ] } - - -type Variable struct { - Name string - Value interface{} -} - -func module(name string, vars ...Variable) { - -} - -/* - - - -*/ \ No newline at end of file diff --git a/example/github_payload.json b/example/github_payload.json index cd77b03d..4cdf0264 100644 --- a/example/github_payload.json +++ b/example/github_payload.json @@ -1,17 +1,28 @@ { - "commits": [ - { - "id": "EXAMPLE", - "added": [], - "modified": ["dinghyfile"] - } - ], - "repository": { - "name": "dinghy-plank-integration", - "organization": "armory-io", - "owner": { - "login": "dotdotdotpaul" - } - }, - "ref": "refs/heads/master" + "ref": "refs/heads/master", + "repository": { + "name": "dinghy-plank-integration", + "organization": "armory-io", + "full_name": "armory-io/dinghy-plank-integration", + "private": true, + "owner": { + "name": "dotdotdotpaul", + "login": "dotdotdotpaul" + } + }, + "pusher": { + "name": "dotdotdotpaul" + }, + "organization": { + "login": "armory-io" + }, + "commits": [ + { + "id": "example", + "tree_id": "example", + "added": [], + "removed": [], + "modified": ["dinghyfile"] + } + ] } diff --git a/example/simple.pipeline.module b/example/simple.pipeline.module index 1b18e5ac..ab12d675 100644 --- a/example/simple.pipeline.module +++ b/example/simple.pipeline.module @@ -1,10 +1,10 @@ { - "application": "dinghy", + "application": "test-dinghy", "keepWaitingPipelines": false, "limitConcurrent": true, - "name": "Simple", + "name": "test pipeline module", "stages": [ - {{ module wait.stage.module }} + {{ module "wait.stage.module" "waitTime" 200 }} ], "triggers": [] -} \ No newline at end of file +} diff --git a/example/wait.stage.module b/example/wait.stage.module index c1975a49..b261d952 100644 --- a/example/wait.stage.module +++ b/example/wait.stage.module @@ -1,7 +1,7 @@ { - "name": "Wait", - "refId": "1", - "requisiteStageRefIds": [], - "type": "wait", - "waitTime": 120 -} \ No newline at end of file + "name": "{{ var "name" ?: "defaultname" }}", + "refId": "1", + "requisiteStageRefIds": [], + "type": "wait", + "waitTime": {{ var "waitTime" ?: 10 }} +}