Reputation: 2126
I'm trying to achieve something in CircleCI that seemed relatively simple in the past with Jenkins etc but is proving a little more difficult here.
At a high-level, I want to look at a certain branch in circleCI, then trigger a pipeline which will take a small number of parameters and basically run our Selenium tests against a specific environment.
I found the following docs which looked promising - https://circleci.com/docs/triggers-overview/#run-a-pipeline-from-the-circleci-web-app
However, it's pretty light on detail.
Here's my attempt at a solution:
on_demand_test_run_on_env:
when:
equal: [ true, << pipeline.parameters.on_demand_test_run >> ]
jobs:
- checkout_branch
- feature_tests:
name: Parallel Tests
parallelism: 10
feature_paths: features/parallel_tests
tags: << pipeline.parameters.on_demand_cucumber_tags >>
context: nightly_run
requires:
- checkout_branch
- feature_tests:
name: Serial Tests
parallelism: 10
feature_paths: features/serial_tests
tags: << pipeline.parameters.on_demand_cucumber_tags >>
context: nightly_run
requires:
- checkout_branch
I have a few problems:
In my head this is something simple like:
feature_tests:
environment:
test_environment: << parameters.on_demand_test_environment >>
However, I'm worried this won't work with how parameters are evaluated
Upvotes: 0
Views: 979
Reputation: 2126
Surprisingly, this did actually work!
For problem 1 I did need to provide default parameter types/values to get a valid circleci config
For problem 2, there was simply no issue for my needs anyway
Upvotes: 0