Set environment from URL
Quote from ljunggren on July 12, 2020, 9:11 pmIn order to set the environment directly from your CI server, we have now added the environment id as a URL parameter.
The format is as follows:
http://staging-be.boozang.com/extension?token=xxxx&env=0#5ee2342740dbe86fff950c0a/master/m7/t1/runYou can now find the environment id on the Environment settings view:
In order to set the environment directly from your CI server, we have now added the environment id as a URL parameter.
The format is as follows:
http://staging-be.boozang.com/extension?token=xxxx&env=0#5ee2342740dbe86fff950c0a/master/m7/t1/run
You can now find the environment id on the Environment settings view:
Quote from Gianni on July 13, 2020, 10:35 amExcellent!
Very useful feature, we can now have two parametrized jobs for the two main environments where we run our tests.
Excellent!
Very useful feature, we can now have two parametrized jobs for the two main environments where we run our tests.
Quote from ljunggren on July 13, 2020, 8:43 pmAs suggested, we will log the setting of environment when running the CI job so that you can see that it has been loaded successfully.
As suggested, we will log the setting of environment when running the CI job so that you can see that it has been loaded successfully.
Quote from Gianni on July 15, 2020, 6:55 amHi,
I'd like to build a Jenkins job that takes two parameters: 1) the environment 2) the suite to run.
In Jenkins I shall do a concatenation with: static part (including token) + $env + $suite
http://eu.boozang.com/extension?token=xxxx&env=0#xxxx/master/mx/tx/run
What do you think? How can we easily create the proper url?
Hi,
I'd like to build a Jenkins job that takes two parameters: 1) the environment 2) the suite to run.
In Jenkins I shall do a concatenation with: static part (including token) + $env + $suite
http://eu.boozang.com/extension?token=xxxx&env=0#xxxx/master/mx/tx/run
What do you think? How can we easily create the proper url?
Quote from ljunggren on July 15, 2020, 10:45 pmThis is a great idea, and how I setup my job when not using tags.
I just created an example and it was a little trickier than I initially expected, but this should work.
Define what you need parameterized as String parameters. In my example I have
- Env ($env)
- Module id ($module_id)
- Test id ($test_id)
See below screenshot how it looks in Jenkins
After that, I add my static variables for the job (I still separate them so I can easily duplicate this job for different projects). I have
- BOOZANG_ENV="http://eu.boozang.com"
- SECRET_TOKEN=c3f72763aec458ee8f4c79e6ac7517c65oo65b7579826d487652a2dd
- PROJECT_ID=5ee65b7579826a487652a2bc
- BRANCH=master
In the script part, I build the URL and run the job via Docker. This is what I did, but you can customize it to your liking
echo Running module id: $module_id and test id: $test_id on env: $env echo Cleanup logs and report files rm -rf *.out rm -rf *.log rm -rf *.json rm -rf *.html rm -rf *.png echo Seeting job static variables BOOZANG_ENV="http://eu.boozang.com" SECRET_TOKEN=c3f72763aec4580d8f4c79e6ac7517c65ee65b7579826d487652d2dd PROJECT_ID=5ee65b7579826a487652a2bc BRANCH=master echo Calculating full URL URL="${BOOZANG_ENV}/extension?token=${SECRET_TOKEN}&env=${env}#${PROJECT_ID}/${BRANCH}/${module_id}/${test_id}/run" echo URL=${URL} nohup docker run --rm -v "$(pwd):/var/boozang/" styrman/boozang-runner ${URL}Try it out and see if it works!
This is a great idea, and how I setup my job when not using tags.
I just created an example and it was a little trickier than I initially expected, but this should work.
Define what you need parameterized as String parameters. In my example I have
- Env ($env)
- Module id ($module_id)
- Test id ($test_id)
See below screenshot how it looks in Jenkins
After that, I add my static variables for the job (I still separate them so I can easily duplicate this job for different projects). I have
- BOOZANG_ENV="http://eu.boozang.com"
- SECRET_TOKEN=c3f72763aec458ee8f4c79e6ac7517c65oo65b7579826d487652a2dd
- PROJECT_ID=5ee65b7579826a487652a2bc
- BRANCH=master
In the script part, I build the URL and run the job via Docker. This is what I did, but you can customize it to your liking
echo Running module id: $module_id and test id: $test_id on env: $env echo Cleanup logs and report files rm -rf *.out rm -rf *.log rm -rf *.json rm -rf *.html rm -rf *.png echo Seeting job static variables BOOZANG_ENV="http://eu.boozang.com" SECRET_TOKEN=c3f72763aec4580d8f4c79e6ac7517c65ee65b7579826d487652d2dd PROJECT_ID=5ee65b7579826a487652a2bc BRANCH=master echo Calculating full URL URL="${BOOZANG_ENV}/extension?token=${SECRET_TOKEN}&env=${env}#${PROJECT_ID}/${BRANCH}/${module_id}/${test_id}/run" echo URL=${URL} nohup docker run --rm -v "$(pwd):/var/boozang/" styrman/boozang-runner ${URL}
Try it out and see if it works!