How to trigger manual workflow runs?


#1

Hi,

I would like to trigger a manual workflow run, but can’t seem to find an option to do so?

Thanks in advance,

PS: running the setup job doesn’t trigger tests and deploy_production jobs


Trigger workflow by API
#2

I don’t think there is a way to achieve that today


#3

That’s a shame, I have to enable build on every branch and then push an empty commit on my production branch.

I feel like the cancel button should be rebuild when the build is not pending (so not run, passed, failed, etc)


#4

Hi,

I have exactly the same problem. I have a staging branch which should trigger a specific workflow but because I have the “Only build pull requests” setting on it doesn’t. Ideally, I would like to be able to trigger that workflow manually.

I don’t want to turn that “Only build pull requests” setting off: it would trigger to many unnecessary builds for our team.

What would be your recommendation?

Cheers.


#5

We have rolled out functionality to add a manual workflow run. Here is an example to set up an approval job in your workflow:

workflows:
  version: 2
  build-test-and-approval-deploy:
    jobs:
      - build
      - test1:
          requires:
            - build
      - test2:
          requires:
            - test1
      - test3:
         type: approval
         requires:
           - test1
           - test2
      - deploy:
          requires:
            - test3

test3 is a special job of approval type and must be declared under jobs key for workflow config. Note it should not be declared it under the main 2.0 config. Please let us know if you face any issues.


Parameterized, manually triggered builds
Branch dependent workflow manual authorization
#6

We are interested in triggering manual workflows. Is it possible to trigger a workflow using the API yet?


#7

Not at this time.


#8

Thanks for your response!

Is controlling the workflow via the API on the roadmap? If so - do you know when it would be likely to drop?


#9

Yes!

I wish. Not soon enough. :stuck_out_tongue:


#10

Thank you for this, but… this just seems painful. I (and I think most users) would have expected a simple button “Run” under “Not run” workflows, just like the “Rerun” button is under the green ones (see https://gyazo.com/30e85caad377e68ca961ebe2f1661a4f).


#11

Hi, I have tried using type:approval, but it is does not provide the ability to rerun “not run” workflows, and does not answer my needs.

I understand it is great to hold and then manually approve a deployment, but as for the feature allowing to have multiple default branches (which will be built every time, not only when PRs are open) or even beingle able to trigger “not run” workflows manually from the interface, those features are still missing and it is painful to deploy in production once or twice a day.


#12

Agree it’s painful. In order to make it manageable, it needs a notification hook and a postback so it can be sent to the chatops of choice and implement a button there to approve.


#13

Same trouble. Any benefit response?


Option to enable build on several "default" branches
#14

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.