Code Monkey home page Code Monkey logo

Comments (14)

litso avatar litso commented on April 20, 2024

What are the cases where you wouldn't want the build number committed to the repo?

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

I always want this commited, but what happens if the Jenkins job is run for each commit? Also, we can't just commit all changed files, since some setups may modify the project before building the app.

What do you suggest?

from fastlane.

bassrock avatar bassrock commented on April 20, 2024

You could keep the version number in some sort of lock file that specifies the commit it was built for. Then when you re commit you only need to commit that lock file. Also fast lane could compare the commit and only build and increment if it was more than the lock file changed?

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

This is implemented with the latest release

from fastlane.

bassrock avatar bassrock commented on April 20, 2024

Awesome. Is there a doc somewhere that describes how to use it with a Jenkins setup? Maybe I'm missing something

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

@bassrock do you mean something like https://github.com/KrauseFx/fastlane/blob/master/Jenkins.md?

Or how to setup version commits and the other things?

from fastlane.

bassrock avatar bassrock commented on April 20, 2024

@KrauseFx yea I already have it setup like that. I mean jenkins setup with the version commit bumps, without running another build for a version bump.

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

Honestly, I haven't used it myself, but @lmirosevic did probably.

I want to provide a more complex example setup of fastlane, not sure when I get the time to do so.

from fastlane.

seanoshea avatar seanoshea commented on April 20, 2024

I've used PListBuddy in the past to drag a build number out of Jenkins. https://medium.com/salesforce-ux/infograin-plistbuddy-is-your-buddy-b969edb642ef has a sample run script that you could add to your Jenkins specific target?

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

@seanoshea It's not a good idea to use the Jenkins build number, as the number might get reset when you migrate to a new build machine.

from fastlane.

seanoshea avatar seanoshea commented on April 20, 2024

@KrauseFx I believe Jenkins has the ability of re-setting the initial build number which would help if you moved to a new build machine. Not exactly ideal, but would be one way around it.

from fastlane.

bassrock avatar bassrock commented on April 20, 2024

This may be an answer we are looking for: https://github.com/jenkinsci/ci-skip-plugin

Just need to enable this and then make the commit message for a version bump include: "[ci skip]"

from fastlane.

KrauseFx avatar KrauseFx commented on April 20, 2024

That's a pretty neat idea πŸ‘

from fastlane.

ctrevarthen avatar ctrevarthen commented on April 20, 2024

Unfortunately, if your CI job is listening for pushes to a branch, the Jenkins ci-skip-plugin runs after the fact and still requires Jenkins to kick off a build to determine if it should ignore the commit. The job then cancels, leaving the status unknown until a "real" commit comes through.

Instead of the ci-skip-plugin, we configured our Jenkins job's Source Code Management->Additional Behaviors to add the "Polling ignores commits from certain users" behavior. We added the CI "jenkins" user to that list, so any commits coming from the CI server (assuming we're only bumping the version number) will be ignored.

from fastlane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.