Hi
Need some guidance. Is that possible to run or skip particular job in workflow based on runtime parameter
version: 2.1
parameters:
flag:
type: string
default: "
# Define the jobs we want to run for this project
jobs:
build:
docker:
- image: cimg/<language>:<version TAG>
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
steps:
- checkout
- run: echo "this is the build job"
test:
docker:
- image: cimg/<language>:<version TAG>
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
steps:
- checkout
- run: echo "this is the test job"
# Orchestrate our job run sequence
workflows:
build_and_test:
jobs:
- build
- test
Now if flag is Yes then execute job ‘test’ else skip
Is there is any way to do this ? Please suggest