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

Git scm option "Create tag for each build" is activated by default for oneliner syntax

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: job-dsl-plugin
    • Labels:
      None
    • Environment:
      jenkins 1.596.3 LTS
      job-dsl plugin 1.39
      git plugin 2.4.0
    • Similar Issues:

      Description

      scm {
      	git {
      		remote {
      			url ('ssh://blabla')
      		}
      	}
      }
      

      set by defaut option "Create Tags for each build" to false (<skipTag>true</skipTag> in the build.xml)

      scm {
      	git ('ssh://blabla')
      }
      

      Activates the option by default (<skipTag>false</skipTag> in the build.xml)

      Unless specified, i think the option shall be deactivated by default for all syntaxes.

        Attachments

          Activity

          Show
          ldez Ludovic Fernandez added a comment - fix : https://github.com/jenkinsci/job-dsl-plugin/pull/783
          Hide
          daspilker Daniel Spilker added a comment -

          Changing the behavior will introduce an incompatibility for users who rely on this feature. In version 1.x of the Git plugin, creating a tag for each build was the default behavior and Job DSL enables this explicitly to maintain compatibility with 1.x. See https://github.com/jenkinsci/job-dsl-plugin/commit/4c1ca921fdfbd055dcdf72d2f578a1cc7a7000f1.

          But when using Git plugin 2.x, this behavior is unexpected. So it should be mentioned in the docs.

          Show
          daspilker Daniel Spilker added a comment - Changing the behavior will introduce an incompatibility for users who rely on this feature. In version 1.x of the Git plugin, creating a tag for each build was the default behavior and Job DSL enables this explicitly to maintain compatibility with 1.x. See https://github.com/jenkinsci/job-dsl-plugin/commit/4c1ca921fdfbd055dcdf72d2f578a1cc7a7000f1 . But when using Git plugin 2.x, this behavior is unexpected. So it should be mentioned in the docs.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/ScmContext.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/cb854277fb46e147bde0e13a3b3388df50277ae2
          Log:
          enhanced documentation for the Git plugin

          [FIXES JENKINS-33482]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/ScmContext.groovy http://jenkins-ci.org/commit/job-dsl-plugin/cb854277fb46e147bde0e13a3b3388df50277ae2 Log: enhanced documentation for the Git plugin [FIXES JENKINS-33482]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/ScmContext.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/aa04e510af4a08dd4f23a492bf1a208f808cc864
          Log:
          Merge pull request #785 from daspilker/JENKINS-33482

          JENKINS-33482 enhanced documentation for the Git plugin

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/5d924941836f...aa04e510af4a

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/ScmContext.groovy http://jenkins-ci.org/commit/job-dsl-plugin/aa04e510af4a08dd4f23a492bf1a208f808cc864 Log: Merge pull request #785 from daspilker/ JENKINS-33482 JENKINS-33482 enhanced documentation for the Git plugin Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/5d924941836f...aa04e510af4a
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/ScmContextSpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/f68c860066bdf570432bc36981760f11c391fe55
          Log:
          Merge pull request #786 from ldez/JENKINS-33482

          JENKINS-33482 enhance Git one-liner test

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/aa04e510af4a...f68c860066bd

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/ScmContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/f68c860066bdf570432bc36981760f11c391fe55 Log: Merge pull request #786 from ldez/ JENKINS-33482 JENKINS-33482 enhance Git one-liner test Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/aa04e510af4a...f68c860066bd

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              geoffroyjabouley Geoffroy Jabouley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: