-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
003e8e1
commit 6e6e30b
Showing
5 changed files
with
87 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/ruby | ||
# rubocop:disable all | ||
|
||
require_relative '../../e2e' | ||
|
||
start_job <<-JSON | ||
{ | ||
"id": "#{$JOB_ID}", | ||
"executor": "dockercompose", | ||
"compose": { | ||
"containers": [ | ||
{ | ||
"name": "main", | ||
"image": "ruby:2.6" | ||
} | ||
], | ||
"host_setup_commands": [ | ||
{ "directive": "echo HostSetupCommands" } | ||
] | ||
}, | ||
"env_vars": [], | ||
"files": [], | ||
"commands": [ | ||
{ "directive": "echo Hello World" } | ||
], | ||
"epilogue_always_commands": [], | ||
"callbacks": { | ||
"finished": "https://httpbin.org/status/200", | ||
"teardown_finished": "https://httpbin.org/status/200" | ||
} | ||
} | ||
JSON | ||
|
||
wait_for_job_to_finish | ||
|
||
assert_job_log <<-LOG | ||
{"event":"job_started", "timestamp":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"Pulling docker images..."} | ||
*** LONG_OUTPUT *** | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"Pulling docker images...","event":"cmd_finished","exit_code":0,"finished_at":"*","started_at":"*","timestamp":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"Starting the docker image..."} | ||
{"event":"cmd_output", "timestamp":"*", "output":"Starting a new bash session.\\n"} | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"Starting the docker image...","event":"cmd_finished","exit_code":0,"finished_at":"*","started_at":"*","timestamp":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"Exporting environment variables"} | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"Exporting environment variables","exit_code":0,"finished_at":"*","started_at":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"Injecting Files"} | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"Injecting Files","exit_code":0,"finished_at":"*","started_at":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"echo Hello World"} | ||
{"event":"cmd_output", "timestamp":"*", "output":"Hello World\\n"} | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"echo Hello World","exit_code":0,"finished_at":"*","started_at":"*"} | ||
{"event":"cmd_started", "timestamp":"*", "directive":"export SEMAPHORE_JOB_RESULT=passed"} | ||
{"event":"cmd_finished", "timestamp":"*", "directive":"export SEMAPHORE_JOB_RESULT=passed","exit_code":0,"finished_at":"*","started_at":"*"} | ||
{"event":"job_finished", "timestamp":"*", "result":"passed"} | ||
LOG |