Uploaded image for project: '[Read Only] - Hippo Archetype'
  1. [Read Only] - Hippo Archetype
  2. ARCHE-529

Improve (or remove) how we set the buildNumber

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 12.0.1
    • None

    Description

      Archetype adds the buildnumber plugin to find the SCM buildnumber and adds it to the manifest files.
      This is used in bootstrap (re)load logic, likely to be removed for v12
      The version is also shown in the CMS control panel.

      Problems

      • When project has no scm section defined it inherits the scm information from the parent, so the release-pom git configuration
      • When no git is found the buildNumber is always -1 (also shown in the CMS system information)
      • Doing shell executes of commandline git, slowing the build.
      • Defined in the project-pom so hard to get rid of.

      Might be an alternative (f we want to keep the buildNumber) to set it as timestamp:
      <buildNumber>${maven.build.timestamp}</buildNumber>

      If wanted projects can still override it with the version control number

      What is executed by the plugin for every (sub) module:
      [INFO] — buildnumber-maven-plugin:1.4:create (default) @ hippo-acceptance-project-enterprise-addon-targeting —
      [INFO] Executing: /bin/sh c cd '/var/jenkins/workspace/ent_12.0_hippo-acceptance-project-master_deploy_OD2/enterprise/addon/targeting' && 'git' 'rev-parse' '-verify' 'HEAD'
      [INFO] Working directory: /var/jenkins/workspace/ent_12.0_hippo-acceptance-project-master_deploy_OD2/enterprise/addon/targeting
      [INFO] Storing buildNumber: b9e852b5d9ac39ba932aa7fc81d552472926f370 at timestamp: 1498697009295
      [WARNING] Cannot get the branch information from the git repository:
      Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref

      [INFO] Executing: /bin/sh c cd '/var/jenkins/workspace/ent_12.0_hippo-acceptance-project-master_deploy_OD2/enterprise/addon/targeting' && 'git' 'rev-parse' '-verify' 'HEAD'
      [INFO] Working directory: /var/jenkins/workspace/ent_12.0_hippo-acceptance-project-master_deploy_OD2/enterprise/addon/targeting
      [INFO] Storing buildScmBranch: UNKNOWN

      Attachments

        Activity

          People

            Unassigned Unassigned
            abanck Arent-Jan Banck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: