• Jun 07, 2018 · Dynamically list git branches in jenkins job parameter. Gabs. Follow. Jun 7, 2018 ...
    • This plugin takes the idea of the script console one step further and allows you to ease your daily work with the Jenkins script console. save/edit groovy scripts; select the node to execute the script on; download scripts from a shared catalog; scripts repo is exposed via git, push/pull scripts into scriptler
    • execute the git tag shell script and assign it to TAG TAG = sh ( returnStdout: true, script: 'git fetch --tags && git tag --points-at HEAD | awk NF' ).trim() if a tag exists, do something!
    • Listing tag wildcards requires -l or --list option If you want just the entire list of tags, running the command git tag implicitly assumes you want a listing and provides one; the use of -l or --list in this case is optional. If, however, you’re supplying a wildcard pattern to match tag names, the use of -l or --list is mandatory.
    • node. agent { node { label 'labelName' } } behaves the same as agent { label 'labelName' }, but node allows for additional options (such as customWorkspace). docker. Execute the Pipeline, or stage, with the given container which will be dynamically provisioned on a node pre-configured to accept Docker-based Pipelines, or on a node matching the optionally defined label parameter.
    • Plugin Info. This plugin allows you to assign git branch, tag, pull request or revision number as parameter in your builds. Important! There is no need to set up anything special in plugin settings.
    • Jan 14, 2019 · simple JSON script files and shell scripts for interaction with the REST API. Step 2 - nexus-script-example. Maven project for script development with IntelliJ IDEA-supported code completion. Step 3 - complex-script. complex provisioning setup based on a shell script invoking numerous groovy scripts for upload and execution
    • Projects · groovy-lang / 101-scripts · GitLab ... GitLab.com
    • Nov 26, 2014 · Following the lead in a Jenkins plugin comment by Pawel Ratajczak, I instead used the Extensible Choice Parameter plugin to launch an inline Groovy script to fetch current tag and branch data directly from a remote Git repo and present the list of choices to the user. I then execute a git-archive command to fetch only the tip code and none of ...
    • If the revision checked out has a git tag associated with it, the tag name will be exported during the build as GIT_TAG_NAME. If a message was specified when creating the tag, then that message will be exported during the build as the GIT_TAG_MESSAGE environment variable. If no tag message was specified, the commit message will be used.
    • Aug 21, 2020 · Features of Groovy. List, map, range, regular expression literals; Multimethod and metaprogramming; Groovy classes and scripts are usually stored in .groovy files; Scripts contain Groovy statements without any class declaration. Scripts can also contain method definitions outside of class definitions.
    • One common pattern for automated releases I have seen and used relies on Git tags as the catalyst for a release process. The immutable nature of releases and the immutable nature of tags can definitely go hand in hand, but up until few months ago Jenkins Pipeline was not able to trigger effectively off of Git tags.
    • 3 branches 6 tags. Go to file Code ... Use Git or checkout with SVN using the web URL. ... GroovyFX is simple to include in Groovy scripts thanks to Groovy’s Grab ...
    • // This script goes through all the jobs and checks if they are using the Groovy Postbuild // if they are, then it computes the hash value, and checks against the ones that are approved. import org.jenkinsci.plugins.scriptsecurity.scripts.*
    • Jun 18, 2020 · There is also a Git Changelog Plugin. It can be used for parsing Git (returnType CONTEXT) or rendering a changelog with the context and Mustach template (returnType STRING). More docs in the Wiki or GitHub, but here is a little something that renders the changelog to a string.
    • #!groovy node { stage(' configFile Plugin ') { // 'ID' refers to alpha-numeric value generated automatically by Jenkins. // This code snippet assumes that the config file is stored in Jenkins. // help to assign the ID of config file to a variable, this is optional // as ID can be used directly within 'configFileProvider' step too. def mycfg_file = ' <substitute-alpha-numeric-value-cfgfille ...
    • One of the bugs I need to check needs to use the git publisher to push a commit back to the originating repository and branch. In the snippet generator I can see an entry for "publishHTML", but I don't see any entry that would let me use the git publisher to push changes.
  • node. agent { node { label 'labelName' } } behaves the same as agent { label 'labelName' }, but node allows for additional options (such as customWorkspace). docker. Execute the Pipeline, or stage, with the given container which will be dynamically provisioned on a node pre-configured to accept Docker-based Pipelines, or on a node matching the optionally defined label parameter.
    • Jun 07, 2018 · Dynamically list git branches in jenkins job parameter. Gabs. Follow. Jun 7, 2018 ...
    • Aug 02, 2018 · Pipeline — Jenkinsfile Sample. This is a sample Jenkins pipeline script. Link to Github Repo is available under Resources section where sample Pipeline scripts exist for Client Angular ...
    • Jenkins groovy script which lists remote tags. GitHub Gist: instantly share code, notes, and snippets. ... vStone / list-git-tags.groovy. Created Apr 14, 2015. Star 3
    • Jun 07, 2018 · Dynamically list git branches in jenkins job parameter. Gabs. Follow. Jun 7, 2018 ...
    • Jun 07, 2018 · Dynamically list git branches in jenkins job parameter. Gabs. Follow. Jun 7, 2018 ...
    • See full list on snippets.xwiki.org
    • execute the git tag shell script and assign it to TAG TAG = sh ( returnStdout: true, script: 'git fetch --tags && git tag --points-at HEAD | awk NF' ).trim() if a tag exists, do something!
    • #!groovy node { stage(' configFile Plugin ') { // 'ID' refers to alpha-numeric value generated automatically by Jenkins. // This code snippet assumes that the config file is stored in Jenkins. // help to assign the ID of config file to a variable, this is optional // as ID can be used directly within 'configFileProvider' step too. def mycfg_file = ' <substitute-alpha-numeric-value-cfgfille ...
  • // This script goes through all the jobs and checks if they are using the Groovy Postbuild // if they are, then it computes the hash value, and checks against the ones that are approved. import org.jenkinsci.plugins.scriptsecurity.scripts.*
    • Jun 07, 2018 · Dynamically list git branches in jenkins job parameter. Gabs. Follow. Jun 7, 2018 ...
    • Jenkins groovy script to get a list of latest git branches (with release/ prefix) and latest tags for a GitLab managed repository, usable with Jenkins Extensible Choice plugin and gitflow.
    • This plugin takes the idea of the script console one step further and allows you to ease your daily work with the Jenkins script console. save/edit groovy scripts; select the node to execute the script on; download scripts from a shared catalog; scripts repo is exposed via git, push/pull scripts into scriptler
    • Oct 14, 2011 · As some light research I was looking at how to determine a Git repository’s current branch name in a Groovy script. In the Git CLI this would be shown with: C:\temp\git\SdWf\project>git branch d12345-validation-fails d54321-login-box f52123-error-report * master
    • Groovy Scripting Engine for NukkitX
    • Since I couldn't find a way to do it using expression language, I've found out a way to do it using a script in Groovy. So I've changed the Condition Type at Camunda to 'Script' and Script Format to 'groovy', to indicate that the conditional needed to be evaluated as a groovy script. Nice. But I've never wrote a single line in Groovy!
  • Repository has no tags yet. Use git tag command to add a new one: git tag -a v1.4 -m 'version 1.4'
    • Sep 16, 2018 · Propagate the Phase parameter to the inline Groovy scripts dynBranch and dynBranchFB; In the script dynBranch the procedural invocation of Git command takes care of filtering the list of branches. Similar command can be used to collect e.g. tags. The SecureGroovyScript constructor has a boolean argument indicating Groovy sandbox.
    • // This script goes through all the jobs and checks if they are using the Groovy Postbuild // if they are, then it computes the hash value, and checks against the ones that are approved. import org.jenkinsci.plugins.scriptsecurity.scripts.*
    • May 27, 2019 · Jenkins helps you quite a lot when it comes to building from a tag, as it handily provides an environment variable to that build by the name of TAG_NAME which has the value of that specific tag. Therefore it is quite easy to influence this in your test: you just have to set the variable TAG_NAME to something, and the test framework will work ...
    • Since I couldn't find a way to do it using expression language, I've found out a way to do it using a script in Groovy. So I've changed the Condition Type at Camunda to 'Script' and Script Format to 'groovy', to indicate that the conditional needed to be evaluated as a groovy script. Nice. But I've never wrote a single line in Groovy!
    • Oct 14, 2011 · As some light research I was looking at how to determine a Git repository’s current branch name in a Groovy script. In the Git CLI this would be shown with: C:\temp\git\SdWf\project>git branch d12345-validation-fails d54321-login-box f52123-error-report * master

Groovy script to list git tags