Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create skipped jobs #2991

Open
altany opened this issue Mar 31, 2021 · 2 comments
Open

Create skipped jobs #2991

altany opened this issue Mar 31, 2021 · 2 comments
Labels

Comments

@altany
Copy link

altany commented Mar 31, 2021

Is there a way to include a job to my configuration but skip it.

Meaning that I want to have the option to run the job manually if I chose to - for example by clicking the restart button, as I would if I had manually cancelled - and not have it run automatically.

This is different to adding conditionals in a stage as the idea is to have a job available for all relevant builds, but I get to chose if it runs.

@kasperk81
Copy link

kasperk81 commented Jul 14, 2021

I don't think it is currently possible on TravisCI. I have used it on GitHub Actions with workflow dispatch.

here is a quick example: https://github.com/kasperk81/actionstesting/actions/workflows/myoptionalflow.yml
with regular merge to master, PR or tag push, it will skip the optional job:
2021-07-15_285x169_scrot
and to manually run the optional job, the button will show up to the owner (or person who has access, collaborator/member etc.):
2021-07-15_1278x476_scrot
change "nope" to "yes" and hit Run workflow, it will then run the optional step:
2021-07-15_275x165_scrot
(you can fork and try)
Note: here you are in control of "optional' or "skip" semantics, whichever way you want to construct your workflow. Also optional and default jobs can be separated on workflow level too, i.e. put them in separate workflow yml files.

@stale
Copy link

stale bot commented Jan 9, 2022

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants