Skip to content
New issue

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

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

Already on GitHub? # to your account

skip run with special commit #90

Merged
merged 1 commit into from
Sep 20, 2019
Merged

skip run with special commit #90

merged 1 commit into from
Sep 20, 2019

Conversation

camandel
Copy link
Contributor

I've tried to fix issue #51 adding a new option (skip_message) at "run" level:

version: v0
runs:
  - name: run01
    skip_message: "[ci skip]"
    tasks:
      - name: task01
        runtime:
          type: pod
          containers:
            - image: busybox

  - name: run02
    tasks:
      - name: task01
        runtime:
          type: pod
          containers:
            - image: busybox

if the commit message contains the string specified in skip_message, for instance "[ci skip] Update README", run01 will be skipped and only run02 will be processed.

@sgotti
Copy link
Member

sgotti commented Aug 27, 2019

@camandel Thanks for your PR!

The idea in #51 wasn't clear but I'd not put a skip message option in the run config.
I'll prefer having a global (and in future maybe configurable, but in a future PR) regular expression to match the commit message so users won't have to define it in every run config.

P.S. Don't close this PR but just update it

@sgotti
Copy link
Member

sgotti commented Sep 3, 2019

@camandel I saw you updated the PR. The implementation looks good to me but we need some tests to check that everything works.

Before merging it can you add some integration tests under tests/setup_test.go that creates a commit with the [ci skip] message (one in the description and one in the message body to see that both work) and check that no run is created?

@camandel camandel force-pushed the ci_skip branch 2 times, most recently from ea6fc54 to a505c4e Compare September 9, 2019 06:53
@camandel
Copy link
Contributor Author

camandel commented Sep 9, 2019

I added the integration tests. I'm not sure because the run failed on TestCreateProject, the same function is used in other tests that passed.

@sgotti
Copy link
Member

sgotti commented Sep 18, 2019

@camandel Please rebase into current master your commit and force push instead of merging master inside your branch.

Copy link
Member

@sgotti sgotti left a comment

Choose a reason for hiding this comment

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

@camandel LGTM. Thanks!

@sgotti sgotti merged commit c3ca892 into agola-io:master Sep 20, 2019
@camandel camandel deleted the ci_skip branch September 21, 2019 14:40
tulliobotti64 pushed a commit to tulliobotti64/agola that referenced this pull request Oct 19, 2022
tulliobotti64 pushed a commit to tulliobotti64/agola that referenced this pull request Oct 19, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants