Closed tiny-pangolin closed 1 year ago
hmm you can already skip by filter out event "manual" for all workflows not intended to run
I don't think we should make a selector for workflows ... if at all, an option to specify the config path (witch would result in same functionality)
-> #1722
You can pass variables already using the manual workflow. Such a variable could be the ansible role / filter. Or you could pre-define all ansible tasks you want to execute and add when filters like:
when:
- evaluate: 'MY_ROLE == "openssh"'
How would I define MY_ROLE
I updated one of my files in the .woodpecker folder and I am getting an error saying
Execution error
unknown name ROLES (1:1) | ROLES contains "kics" | ^
when roles defined as a secret and and as a variable when I run the pipeline manually? I am guess this section of the docs is the right place to look
clone:
git:
image: woodpeckerci/plugin-git
settings:
skip_verify: true
pipeline:
KICS Scan:
image: checkmarx/kics:latest
commands:
- kics scan --no-progress -p . --disable-secrets --report-formats json --output-name kics-results
when:
- evaluate: 'ROLES contains "kics"'
Ansible Lint:
image: docker.io/pipelinecomponents/ansible-lint
commands:
- ansible-lint --show-relpath .
when:
- evaluate: 'ROLES contains "lint"'
You can pass variables already using the manual workflow. Such a variable could be the ansible role / filter. Or you could pre-define all ansible tasks you want to execute and add when filters like:
when: - evaluate: 'MY_ROLE == "openssh"'
That doesn't work :(
when:
event: manual
evaluate: 'TESTVAR == "testval"'
skip_clone: true
steps:
...
Only built-in environment variables work now.
After updating the container this worked thanks for all the hard work :)
seems to be resolved
Clear and concise description of the problem
I would like to be a able to run only certian workflows in a deployment without updating code in a repository.
Suggested solution
Add a an option in the yaml file or a UI option that requires each workflow be triggered manually.
Alternative
Additional context
I would like to see manual workflow steps added so I can have a 1 work flow per ansible role I would like to deploy. Then start a build manually to deploy that role whenever without updating git. This would function to manual steps in bitbucket pipelines https://bitbucket.org/blog/pipelines-manual-steps-confidence-deployment-pipeline
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]