Open darrenhaken opened 8 years ago
It's ruby code so you can do anything you want.
Execute a rake task:
smoke_test: |
raise "smoke failed" unless system("rake test:smoke SMOKE_TEST_HOSTNAME=#{host_name}")
Run a python verify script:
smoke_test: |
raise "smoke failed" unless system("python verify.py #{host_name}")
load a ruby script
smoke_test: |
load "smoke_test.rb"
I tried below but it didn't work as it said the rb file didn't exist. Now you've confirmed it should work I'll look into it again
smoke_test: |
load "smoke_test.rb"
@wpc do you know if eb_deployer defines an environment variable for the environment set?
I ran ENVIRONMENT=test eb_deploy -c eb_deployer.yml -p test.zip -e test
and ENV['ENVIRONMENT']
returns "project-name-test"
That's weird, eb_deployer do not set any environment variables. Use export
to check predefined environment variable in your terminal, and check your inline code in the config file as well.
@wpc I'll look if it's being set on the CI server.
In the smoke test examples it defines a variable host_name
but when I used it in smoke_test.rb
it says its undefined. How does this get set?
i guess you can do
smoke_test: |
SMOKE_TEST_HOST_NAME="#{host_name}"
load "smoke_test.rb"
then reference the host name by constant.
Is it possible to load an rb file for the smoke test rather than being inline? If so can you share an example?