Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28951

Allow for bash type variable expansion in token-macro-plugin

    Details

    • Similar Issues:

      Description

      I'm trying to add the following tag value to docker-build-publish-plugin in the form:

      ${GIT_BRANCH#origin/}
      

      if GIT_BRANCH=origin/master, bash would evaluate the expression to:
      master

      Since docker-build-publish-plugin uses token-macro-plugin this should be handled by the tokenizer.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/tokenmacro/DataBoundTokenMacro.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/Parser.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/TokenMacro.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/Tokenizer.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/Transform.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacro.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/transform/BeginningOrEndMatchTransorm.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/transform/ContentLengthTransform.java
          src/main/java/org/jenkinsci/plugins/tokenmacro/transform/SubstringTransform.java
          src/main/resources/lib/token-macro/help.groovy
          src/main/resources/lib/token-macro/help.jelly
          src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/AdminEmailMacro/help.groovy
          src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/BuildUrlMacro/help.groovy
          src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacro/help.groovy
          src/test/java/org/jenkinsci/plugins/tokenmacro/TokenMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/TransformTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/PropertyFromFileMacroTest.java
          http://jenkins-ci.org/commit/token-macro-plugin/63011d377ec95e508bf4bdd6ed9a1e9e44facffc
          Log:
          Fix JENKINS-28951

          Allow for different transforms on top of the token evaluation

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/org/jenkinsci/plugins/tokenmacro/DataBoundTokenMacro.java src/main/java/org/jenkinsci/plugins/tokenmacro/Parser.java src/main/java/org/jenkinsci/plugins/tokenmacro/TokenMacro.java src/main/java/org/jenkinsci/plugins/tokenmacro/Tokenizer.java src/main/java/org/jenkinsci/plugins/tokenmacro/Transform.java src/main/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacro.java src/main/java/org/jenkinsci/plugins/tokenmacro/transform/BeginningOrEndMatchTransorm.java src/main/java/org/jenkinsci/plugins/tokenmacro/transform/ContentLengthTransform.java src/main/java/org/jenkinsci/plugins/tokenmacro/transform/SubstringTransform.java src/main/resources/lib/token-macro/help.groovy src/main/resources/lib/token-macro/help.jelly src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/AdminEmailMacro/help.groovy src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/BuildUrlMacro/help.groovy src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacro/help.groovy src/test/java/org/jenkinsci/plugins/tokenmacro/TokenMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/TransformTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/PropertyFromFileMacroTest.java http://jenkins-ci.org/commit/token-macro-plugin/63011d377ec95e508bf4bdd6ed9a1e9e44facffc Log: Fix JENKINS-28951 Allow for different transforms on top of the token evaluation
          Hide
          slide_o_mix Alex Earl added a comment -

          Will be fixed in 1.13. Implemented some of the items from here: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

          Show
          slide_o_mix Alex Earl added a comment - Will be fixed in 1.13. Implemented some of the items from here: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              corby Corby Wilson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: