Skip ci - best practice with codefresh

I want my pipeline to update the version number and commit/push to git, of course this should not re trigger the pipeline so in the commit message I will include [skip ci].

  • I do not want to have conditional clauses in each step to stop them executing when [skip ci] is present in the commit message as this is clumsy and difficult to maintain.
  • I do not want to have a step that fails fast when the commit message contains [skip ci] as that would show up as a pipeline failure - which it is not.

What is the standard/best way to achieve the above in codefresh please?

I think the easiest way would be to use the ā€œModified Filesā€ field in your trigger to either exclude your version file or pick only directories where your code is
See Git Triggers Ā· Codefresh | Docs for details

OK that will work thanks for the response @laurent.rochette
I think I have seen a post where there is a feature in the backlog to set up non triggering based on commit message - this would be great.

Has anyone had any success implementing ā€œSkip CIā€ successfully without ā€œModified Filesā€?

Specifically we are updating an NPM package via CI, which includes changing the package.json file. We canā€™t exclude this from triggering CI, because there are plenty of other reasonable reasons why this file may have been changed.

The closest I can get is similar to @Simmon_Berryā€™s comment of failing the build, which is not optimal. I share the concern that this is not a failure and it should not appear as such in the build log.

For reference, most other CI systems will skip commits with either [ci skip] or [skip ci]. An admittedly out of date survey of various CI systems shows that this is a relatively standardised way to skip commits, would be great to see something similar for CF.

Hello

We have an internal issue to implement ā€œskip ciā€. No specific ETA yet though.
If you open a support ticket with us, then the support team will add you in the customers that need this, and hopefully it will change its position in the backlog.

1 Like

Does this work with GitHub integration though? This is not clear from the docsā€¦

In GitHub Actions and Jenkins this is much simpler, an exclude paths syntax is clearly documented in the workflow yaml / Jenkinsfile, eg:

Hey @HariSekhon

If you are asking whether modified files is available for Github integration, then yes it should work. Have you seen othewise?

You can use both the UI and the full pipeline yaml to define them. See Codefresh API Ā· Codefresh | Docs specification

Hello @Simon_Berry , @pserwylo , @HariSekhon

The ā€œskip ciā€ feature has now been implemented natively in the platform

See details here Git Triggers Ā· Codefresh | Docs

Kostis

1 Like

Is this still functional? Iā€™ve been trying to stop repo commit from triggering a pipeline run by using ā€˜[skip ci]ā€™ in the commit message. But the pipeline still runsā€¦

Hello Nicholas

yes it should be functional.

Please open a support ticket and be sure to include the URL of the build so that our team can take a look

Kostis

Hi Nicholas,

Iā€™ve just tested the [skip ci] commit message and it works as expected for me.
Can you open a support ticket here: Submit a request ā€“ Codefresh
It will help us to better track the request. Please include the build url in the ticket so we can check the logs to see what exactly caused it to ignore the [skip ci] message.
Thanks in advance!