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

Add ability to trigger manual builds #1156

Merged
merged 68 commits into from
Sep 27, 2022

Conversation

ennetech
Copy link
Contributor

@ennetech ennetech commented Sep 2, 2022

closes #83
closes #240

Changelog:

  • UI: button to trigger manual build
  • SERVER: ability to inject variables for a specific build
  • SERVER: trigger action for build
  • Updated gitea dep to allow darwin builds
  • UI: style the form & localization
  • SERVER: auto extract of last commit id of branch
  • SERVER: debug why adding a new event "manual" leads to only clone step being run
  • Error handling for api endpoint
  • MIssing fields for build
  • Persist variables on build restart
  • cli command
  • find a home for ManualBuildReq
  • security checks
  • hide button if not available to user

@anbraten anbraten marked this pull request as draft September 2, 2022 13:38
Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome work already!

server/api/build.go Outdated Show resolved Hide resolved
server/api/build.go Outdated Show resolved Hide resolved
web/src/lib/api/index.ts Outdated Show resolved Hide resolved
@ennetech

This comment was marked as outdated.

server/model/build.go Outdated Show resolved Hide resolved
@ennetech

This comment was marked as resolved.

server/api/build.go Outdated Show resolved Hide resolved
web/src/views/repo/RepoBuild.vue Outdated Show resolved Hide resolved
web/src/views/repo/RepoBuild.vue Outdated Show resolved Hide resolved
web/src/views/repo/RepoBuild.vue Outdated Show resolved Hide resolved
@ennetech

This comment was marked as resolved.

@ennetech ennetech force-pushed the feature/manual_build branch 2 times, most recently from 955b7dc to 0951a22 Compare September 5, 2022 08:53
server/api/build.go Outdated Show resolved Hide resolved
@ennetech
Copy link
Contributor Author

ennetech commented Sep 5, 2022

added function in go client and cli command, i would need a suggestion about where to place ManualBuildReq, in the meantime i'll refactor and add the names in the ui

@6543
Copy link
Member

6543 commented Sep 5, 2022

I thin this pull only will solve #240 but not #83 as that is about manually imitating other events if i understand correctly

@6543
Copy link
Member

6543 commented Sep 5, 2022

& since it was added to the default event filter, docs have to be adjusted

@ennetech
Copy link
Contributor Author

ennetech commented Sep 5, 2022

@6543 actually it passes a Build to pipeline.Create, so it doesn't fake any existing event, i created the "manual" event

The page to be updated is https://woodpecker-ci.org/docs/usage/conditional-execution ?
Also, where the manual trigger should be documented in a new page or in a existing one?

@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Sep 5, 2022

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-1156.surge.sh

server/api/build.go Show resolved Hide resolved
@ennetech ennetech requested a review from 6543 September 22, 2022 05:15
Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ennetech
Copy link
Contributor Author

LGTM if you address the last requested change (https://github.com/woodpecker-ci/woodpecker/pull/1156/files#r966210174)

Where the struct should be duplicated?

@ennetech
Copy link
Contributor Author

@anbraten @qwerty287 @6543 i've moved the dependency away, but i don't think is the correct place

@qwerty287
Copy link
Contributor

I think I'm fine with it, we just never had the case that we need such a struct used to work with http requests...

Ci is failing at the docs BTW, can you just run make docs and commit the result?

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
@6543 6543 added the feature add new functionality label Sep 27, 2022
@6543 6543 added this to the 1.0.0 milestone Sep 27, 2022
@6543 6543 enabled auto-merge (squash) September 27, 2022 01:29
@6543
Copy link
Member

6543 commented Sep 27, 2022

once merged we should create issues that document the followups

@6543 6543 merged commit b4d89a1 into woodpecker-ci:master Sep 27, 2022
@ennetech ennetech deleted the feature/manual_build branch September 27, 2022 09:06
@6543
Copy link
Member

6543 commented Sep 27, 2022

once merged we should create issues that document the followups

-> #1216

@6543
Copy link
Member

6543 commented Sep 27, 2022

are there any other?

@6543
Copy link
Member

6543 commented Sep 28, 2022

-> #1222

@woodpecker-ci woodpecker-ci locked as resolved and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature add new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create build from API? Add support to trigger pipelines manually
7 participants