Details

    • Type: Task
    • Status: Done (View Workflow)
    • Priority: Blocker
    • Resolution: Won't Fix
    • Component/s: other
    • Labels:
    • Environment:
      Installed jenkins version 2.19.2, Almost all advance plugin, Centos 7jdk 1.8.101
    • Similar Issues:

      Description

      while running jenkins pipeline job it is shwoing job dsl method 'version()' is not found, Follwoing is the code

      sh "git config credential.username ${env.GIT_USERNAME}"
      sh "git config credential.helper '!echo password=\$GIT_PASSWORD; echo'"
      sh "git config user.name 'jenkins' "
      sh "git config user.email 'jenkins-gcs@example.com' "
      sh "mvn versions:set -DnewVersion=${version()}"
      sh "mvn -T 2C clean install"
      if (DO_DEPLOY == "true"){
      sh "git tag -a ${version()} -m 'Jenkins Build'"
      sh "GIT_ASKPASS=true git push origin ${version()}"
      if(gitBranch=="jenkins_slave")

      { echo "its master branch hence deploying.." sh "mvn deploy" }

      else{
      echo "stage build branch"+gitBranch
      sh "cd gcs-manifest-beanstalk"
      sh "mvn deploy"

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          Almost all fields make no sense here. Please read https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue

          Show
          danielbeck Daniel Beck added a comment - Almost all fields make no sense here. Please read https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue

            People

            • Assignee:
              Unassigned
              Reporter:
              atulsharma1989 Atul Sharma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: