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