Skip to content

Commit

Permalink
Merge #50
Browse files Browse the repository at this point in the history
50: Pass block-workflow parameter to until_front_of_line step [semver:patch] r=eddiewebb a=mu-bro

### Motivation, issues

**_block-workflow_** parameter is not passed from **queue/block_workflow** job to **until_front_of_line** step, therefore block-workflow is always set to 'false'.


Co-authored-by: Ilya Artamonov <[email protected]>
Co-authored-by: ilya.artamonov <[email protected]>
Co-authored-by: Eddie Webb <[email protected]>
  • Loading branch information
4 people authored Jan 13, 2020
2 parents 56bf4a7 + 6d73812 commit 2a0544d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/jobs/block_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ resource_class: small
steps:
- until_front_of_line:
consider-branch: <<parameters.consider-branch>>
block-workflow: <<parameters.block-workflow>>
time: <<parameters.time>>
dont-quit: <<parameters.dont-quit>>
only-on-branch: <<parameters.only-on-branch>>
Expand Down
22 changes: 22 additions & 0 deletions test/test_expansion.bats
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,25 @@ function setup {

}


@test "Default job sets block workflow properly" {
# given
process_config_with test/inputs/fulljob.yml

# when
assert_jq_match '.jobs | length' 1 #only 1 job
assert_jq_match '.jobs["Single File"].steps | length' 1 #only 1 steps

jq -r '.jobs["Single File"].steps[0].run.command' $JSON_PROJECT_CONFIG > ${BATS_TMPDIR}/script-${BATS_TEST_NUMBER}.bash

export CIRCLECI_API_KEY="madethisup"
export CIRCLE_BUILD_NUM="2"
export CIRCLE_JOB="singlejob"
export CIRCLE_PROJECT_USERNAME="madethisup"
export CIRCLE_PROJECT_REPONAME="madethisup"
export CIRCLE_REPOSITORY_URL="madethisup"
export CIRCLE_BRANCH="madethisup"

run bash ${BATS_TMPDIR}/script-${BATS_TEST_NUMBER}.bash
assert_contains_text "Orb parameter block-workflow is true."
}

0 comments on commit 2a0544d

Please sign in to comment.