-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More RPC-parser-powered tests: simple (#119)
* Additional containers: support port mapping * Additional containers: support command, readiness_command and privileged * Remove github.com/goccy/go-yaml remnants * Make tasks's "allow_failures" field collectible Note that this doesn't apply to the same field in the pipe parser. * Support task and pipe "experimental" and "trigger_type" fields * When handling scalar scripts, split them into multiple lines * TasksToJSON: suppress deprecated_instance field when generating JSON * Simple tests
- Loading branch information
Showing
33 changed files
with
983 additions
and
21 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
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
69 changes: 69 additions & 0 deletions
69
pkg/parser/testdata/via-rpc/simple-additionalContainers.json
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,69 @@ | ||
[ | ||
{ | ||
"commands": [ | ||
{ | ||
"cloneInstruction": {}, | ||
"name": "clone" | ||
}, | ||
{ | ||
"name": "main", | ||
"scriptInstruction": { | ||
"scripts": [ | ||
"./test1.sh" | ||
] | ||
} | ||
} | ||
], | ||
"instance": { | ||
"@type": "type.googleapis.com/org.cirruslabs.ci.services.cirruscigrpc.ContainerInstance", | ||
"additionalContainers": [ | ||
{ | ||
"command": [ | ||
"echo $FOO" | ||
], | ||
"containerPort": 6379, | ||
"cpu": 1.3, | ||
"environment": { | ||
"FOO": "Bar" | ||
}, | ||
"image": "memcached:1.5.0-alpine", | ||
"memory": 777, | ||
"name": "memcached", | ||
"readinessCommand": [ | ||
"./health.sh" | ||
] | ||
}, | ||
{ | ||
"containerPort": 6379, | ||
"cpu": 0.5, | ||
"hostPort": 7777, | ||
"image": "redis:3.2-alpine", | ||
"memory": 512, | ||
"name": "redis" | ||
}, | ||
{ | ||
"containerPort": 2375, | ||
"cpu": 0.5, | ||
"image": "docker:18.06-dind", | ||
"memory": 512, | ||
"name": "docker", | ||
"privileged": true | ||
} | ||
], | ||
"cpu": 2, | ||
"image": "my-service:latest", | ||
"memory": 4096 | ||
}, | ||
"metadata": { | ||
"properties": { | ||
"allowFailures": "false", | ||
"executionLock": "null", | ||
"experimentalFeaturesEnabled": "false", | ||
"indexWithinBuild": "0", | ||
"timeoutInSeconds": "3600", | ||
"triggerType": "AUTOMATIC" | ||
} | ||
}, | ||
"name": "task1" | ||
} | ||
] |
23 changes: 23 additions & 0 deletions
23
pkg/parser/testdata/via-rpc/simple-additionalContainers.yml
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,23 @@ | ||
container: | ||
image: my-service:latest | ||
additional_containers: | ||
- name: memcached | ||
image: memcached:1.5.0-alpine | ||
port: 6379 | ||
cpu: 1.3 | ||
memory: 777 | ||
command: echo $FOO | ||
readiness_command: ./health.sh | ||
environment: | ||
FOO: Bar | ||
- name: redis | ||
image: redis:3.2-alpine | ||
port: 7777:6379 | ||
- name: docker | ||
image: docker:18.06-dind | ||
port: 2375 | ||
privileged: true | ||
|
||
task: | ||
name: task1 | ||
script: ./test1.sh |
Oops, something went wrong.