Is to possible to clone from tag

We have a need to build multiple installers off the same git tag. Is there a way to do it? Currently, we trigger builds via rest api and pass branch and configuration. We have several configurations and need an installer built for each. I tried passing tag name in the branch parameter and got a 404.

  1. Hi David,

    Indeed, using builds API you can start a new build from a branch only. However, while calling API endpoint to start a new branch build you can pass an array of environment variables that will be available on the VM during the build. So, you can pass the name of the tag you want to fetch, for example MY_RELEASE_TAG: "v1.0" and then during the build in install section, after repo is cloned, you can have something like:

    install:
    - git fetch --tags
    - git checkout tags/%MY_RELEASE_TAG%
    

    Thus you'll have a tag checked out in the current directory. Let me know how that worked.

  2. I realized that I really do want to make a release branch in this case.
    Thanks for your help. S Novim Godom!

  3. Thanks for the update and Happy New Year! :)

  4. Feodor Fitsner closed this discussion on 03 Apr, 2020 06:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac