Title: git.closest.tag values not set in Azure pipeline · Issue #239 · git-commit-id/git-commit-id-plugin-core · GitHub
Open Graph Title: git.closest.tag values not set in Azure pipeline · Issue #239 · git-commit-id/git-commit-id-plugin-core
X Title: git.closest.tag values not set in Azure pipeline · Issue #239 · git-commit-id/git-commit-id-plugin-core
Description: Describe the bug (required) I have configured a Maven build to include tags and git.closest.tag.* values in git.properties. The verbose log shows that tags are being collected but the git.closest.tag.name and git.closest.tag.commit.count...
Open Graph Description: Describe the bug (required) I have configured a Maven build to include tags and git.closest.tag.* values in git.properties. The verbose log shows that tags are being collected but the git.closest.t...
X Description: Describe the bug (required) I have configured a Maven build to include tags and git.closest.tag.* values in git.properties. The verbose log shows that tags are being collected but the git.closest.t...
Opengraph URL: https://github.com/git-commit-id/git-commit-id-plugin-core/issues/239
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git.closest.tag values not set in Azure pipeline","articleBody":"### Describe the bug (required)\r\n\r\nI have configured a Maven build to include tags and git.closest.tag.* values in git.properties. The verbose log shows that tags are being collected but the git.closest.tag.name and git.closest.tag.commit.count properties are blank. The repository has two tags 0.0.0 and 0.0.1 and the main branch is currently 1 commit ahead of the 0.0.1 tag.\r\n\r\n### Tell us about your plugin configuration (required)\r\n\r\n```xml\r\n \u003cplugin\u003e\r\n \u003cgroupId\u003eio.github.git-commit-id\u003c/groupId\u003e\r\n \u003cartifactId\u003egit-commit-id-maven-plugin\u003c/artifactId\u003e\r\n \u003cversion\u003e6.0.0\u003c/version\u003e\r\n \u003cexecutions\u003e\r\n \u003cexecution\u003e\r\n \u003cid\u003eget-the-git-infos\u003c/id\u003e\r\n \u003cgoals\u003e\r\n \u003cgoal\u003erevision\u003c/goal\u003e\r\n \u003c/goals\u003e\r\n \u003cphase\u003einitialize\u003c/phase\u003e\r\n \u003c/execution\u003e\r\n \u003c/executions\u003e\r\n \u003cconfiguration\u003e\r\n \u003cverbose\u003etrue\u003c/verbose\u003e\r\n \u003cgenerateGitPropertiesFile\u003etrue\u003c/generateGitPropertiesFile\u003e\r\n \u003cgenerateGitPropertiesFilename\u003e${project.build.outputDirectory}/git.properties\u003c/generateGitPropertiesFilename\u003e\r\n \u003cincludeOnlyProperties\u003e\r\n \u003cincludeOnlyProperty\u003e^git.build.(time|version)$\u003c/includeOnlyProperty\u003e\r\n \u003cincludeOnlyProperty\u003e^git.commit.id.(abbrev|full)$\u003c/includeOnlyProperty\u003e\r\n \u003cincludeOnlyProperty\u003e^git.tags$\u003c/includeOnlyProperty\u003e\r\n \u003cincludeOnlyProperty\u003e^git.closest.tag.*$\u003c/includeOnlyProperty\u003e\r\n \u003cincludeOnlyProperty\u003e^git.dirty$\u003c/includeOnlyProperty\u003e\r\n \u003cincludeOnlyProperty\u003e^git.branch\u003c/includeOnlyProperty\u003e\r\n \u003c/includeOnlyProperties\u003e\r\n \u003ccommitIdGenerationMode\u003efull\u003c/commitIdGenerationMode\u003e\r\n \u003cgitDescribe\u003e\r\n \u003ctags\u003etrue\u003c/tags\u003e\r\n \u003c/gitDescribe\u003e\r\n \u003c/configuration\u003e\r\n \u003c/plugin\u003e\r\n```\r\n\r\n\r\n### Tell us about the Plugin version used (required)\r\n\r\n6.0.0\r\n\r\n### Tell us about the Maven version used (required)\r\n\r\n```bash\r\nmvn --version\r\nApache Maven 3.6.3\r\nMaven home: /usr/share/maven\r\nJava version: 17.0.7, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64\r\nDefault locale: en_US, platform encoding: UTF-8\r\nOS name: \"linux\", version: \"5.4.0-137-generic\", arch: \"amd64\", family: \"unix\"\r\n```\r\n\r\n\r\n### Steps to Reproduce (required)\r\n\r\nThe Azure pipeline looks like the following:\r\n```yaml\r\ntrigger:\r\n - main\r\n\r\npool:\r\n name: home-lab\r\n\r\nvariables:\r\n - name: storageaccount_name\r\n value: REDACTED\r\n - name: container_name\r\n value: REDACTED\r\n\r\nsteps:\r\n - task: Maven@4\r\n inputs:\r\n mavenPomFile: 'pom.xml'\r\n mavenOptions: '-Xmx3072m --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED'\r\n javaHomeOption: 'JDKVersion'\r\n jdkVersionOption: '1.17'\r\n jdkArchitectureOption: 'x64'\r\n publishJUnitResults: true\r\n testResultsFiles: '**/TEST-*.xml'\r\n options: '--batch-mode'\r\n goals: 'package verify'\r\n\r\n - publish: $(System.DefaultWorkingDirectory)/target/openapi.json\r\n artifact: openapi-spec.json\r\n\r\n - task: AzureCLI@2\r\n inputs:\r\n azureSubscription: 'REDACTED'\r\n scriptType: 'bash'\r\n scriptLocation: 'inlineScript'\r\n addSpnToEnvironment: true\r\n inlineScript: \u003e\r\n az apim api import\r\n --path \"/\"\r\n --api-id \"REDACTED\"\r\n --resource-group \"REDACTED\"\r\n --service-name \"REDACTED\"\r\n --specification-path \"$(System.DefaultWorkingDirectory)/target/openapi.json\"\r\n --specification-format \"OpenApiJson\" \r\n\r\n - task: AzureRmWebAppDeployment@4\r\n inputs:\r\n ConnectionType: 'AzureRM'\r\n azureSubscription: 'REDACTED'\r\n appType: 'webAppLinux'\r\n WebAppName: 'REDACTED'\r\n packageForLinux: '$(System.DefaultWorkingDirectory)/target/training-api-app.jar'\r\n RuntimeStack: 'JAVA|17-java17'\r\n StartupCommand: \u003e\r\n java\r\n -Djava.net.preferIPv4Stack=true\r\n -Dserver.port=80\r\n -jar /home/site/wwwroot/training-api-app.jar\r\n```\r\n\r\n\r\n### Are there any stacktraces or any error messages? (required)\r\n\r\n```bash\r\n2023-05-31T15:21:04.7695698Z [INFO] dotGitDirectory '/home/krupagj/azure-devops/_work/1/s/.git'\r\n2023-05-31T15:21:05.0473326Z [INFO] Using environment variable based branch name. BUILD_SOURCEBRANCH = refs/heads/main (branch = main)\r\n2023-05-31T15:21:05.0476113Z [INFO] Collected git.branch with value main\r\n2023-05-31T15:21:05.0498662Z [INFO] Collected git.commit.id.full with value 7c96105d762080e184ff6f30ea916df36d50b628\r\n2023-05-31T15:21:05.0511394Z [INFO] Collected git.commit.id.abbrev with value 7c96105\r\n2023-05-31T15:21:05.1047632Z [INFO] Collected git.dirty with value false\r\n2023-05-31T15:21:05.1184023Z [INFO] Collected git.tags with value \r\n2023-05-31T15:21:05.1204474Z [INFO] evalCommit is [7c96105d762080e184ff6f30ea916df36d50b628]\r\n2023-05-31T15:21:05.1218217Z [INFO] Tag refs [[Ref[refs/tags/0.0.0=e7b8e2074d25e947381d0ea2707ce4152e58fba3(-1)], Ref[refs/tags/0.0.1=1229a63c5f5878f2c1a653c352526d9560f0a725(-1)]]]\r\n2023-05-31T15:21:05.1226996Z [INFO] Including lightweight tag [refs/tags/0.0.0]\r\n2023-05-31T15:21:05.1547469Z [INFO] Including lightweight tag [refs/tags/0.0.1]\r\n2023-05-31T15:21:05.2077783Z [INFO] key [AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]], tags =\u003e [[DatedRevTag{id=e7b8e2074d25e947381d0ea2707ce4152e58fba3, tagName='refs/tags/0.0.0', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2086898Z [INFO] key [AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]], tags =\u003e [[DatedRevTag{id=1229a63c5f5878f2c1a653c352526d9560f0a725, tagName='refs/tags/0.0.1', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2107915Z [INFO] Created map: [{AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]=[0.0.0], AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]=[0.0.1]}]\r\n2023-05-31T15:21:05.2118550Z [INFO] Collected git.closest.tag.name with value \r\n2023-05-31T15:21:05.2138544Z [INFO] evalCommit is [7c96105d762080e184ff6f30ea916df36d50b628]\r\n2023-05-31T15:21:05.2149115Z [INFO] Tag refs [[Ref[refs/tags/0.0.0=e7b8e2074d25e947381d0ea2707ce4152e58fba3(-1)], Ref[refs/tags/0.0.1=1229a63c5f5878f2c1a653c352526d9560f0a725(-1)]]]\r\n2023-05-31T15:21:05.2151702Z [INFO] Including lightweight tag [refs/tags/0.0.0]\r\n2023-05-31T15:21:05.2156059Z [INFO] Including lightweight tag [refs/tags/0.0.1]\r\n2023-05-31T15:21:05.2161957Z [INFO] key [AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]], tags =\u003e [[DatedRevTag{id=e7b8e2074d25e947381d0ea2707ce4152e58fba3, tagName='refs/tags/0.0.0', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2168558Z [INFO] key [AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]], tags =\u003e [[DatedRevTag{id=1229a63c5f5878f2c1a653c352526d9560f0a725, tagName='refs/tags/0.0.1', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2172772Z [INFO] Created map: [{AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]=[0.0.0], AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]=[0.0.1]}]\r\n2023-05-31T15:21:05.2174466Z [INFO] Collected git.closest.tag.commit.count with value \r\n2023-05-31T15:21:05.2248081Z [INFO] Collected git.build.time with value 2023-05-31T15:21:05+0000\r\n2023-05-31T15:21:05.2249476Z [INFO] Collected git.build.version with value 0.0.1-SNAPSHOT\r\n2023-05-31T15:21:05.2339179Z [INFO] including property 'git.tags' in results\r\n2023-05-31T15:21:05.2340026Z [INFO] including property 'git.closest.tag.commit.count' in results\r\n2023-05-31T15:21:05.2349184Z [INFO] including property 'git.build.version' in results\r\n2023-05-31T15:21:05.2349407Z [INFO] including property 'git.commit.id.full' in results\r\n2023-05-31T15:21:05.2349641Z [INFO] including property 'git.commit.id.abbrev' in results\r\n2023-05-31T15:21:05.2349858Z [INFO] including property 'git.closest.tag.name' in results\r\n2023-05-31T15:21:05.2350058Z [INFO] including property 'git.branch' in results\r\n2023-05-31T15:21:05.2350243Z [INFO] including property 'git.build.time' in results\r\n2023-05-31T15:21:05.2350430Z [INFO] including property 'git.dirty' in results\r\n2023-05-31T15:21:05.2364699Z [INFO] Writing properties file [/home/krupagj/azure-devops/_work/1/s/target/classes/git.properties] (for project demo)...\r\n2023-05-31T15:21:05.2492364Z [INFO] \r\n2023-05-31T15:21:05.2493353Z [INFO] --- git-commit-id-maven-plugin:6.0.0:revision (get-the-git-infos) @ training-api-app ---\r\n2023-05-31T15:21:05.2512375Z [INFO] dotGitDirectory '/home/krupagj/azure-devops/_work/1/s/.git'\r\n2023-05-31T15:21:05.2531959Z [INFO] Using environment variable based branch name. BUILD_SOURCEBRANCH = refs/heads/main (branch = main)\r\n2023-05-31T15:21:05.2532562Z [INFO] Collected git.branch with value main\r\n2023-05-31T15:21:05.2537173Z [INFO] Collected git.commit.id.full with value 7c96105d762080e184ff6f30ea916df36d50b628\r\n2023-05-31T15:21:05.2537680Z [INFO] Collected git.commit.id.abbrev with value 7c96105\r\n2023-05-31T15:21:05.2604335Z [INFO] Collected git.dirty with value false\r\n2023-05-31T15:21:05.2622825Z [INFO] Collected git.tags with value \r\n2023-05-31T15:21:05.2635842Z [INFO] evalCommit is [7c96105d762080e184ff6f30ea916df36d50b628]\r\n2023-05-31T15:21:05.2643835Z [INFO] Tag refs [[Ref[refs/tags/0.0.0=e7b8e2074d25e947381d0ea2707ce4152e58fba3(-1)], Ref[refs/tags/0.0.1=1229a63c5f5878f2c1a653c352526d9560f0a725(-1)]]]\r\n2023-05-31T15:21:05.2646826Z [INFO] Including lightweight tag [refs/tags/0.0.0]\r\n2023-05-31T15:21:05.2650754Z [INFO] Including lightweight tag [refs/tags/0.0.1]\r\n2023-05-31T15:21:05.2656801Z [INFO] key [AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]], tags =\u003e [[DatedRevTag{id=e7b8e2074d25e947381d0ea2707ce4152e58fba3, tagName='refs/tags/0.0.0', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2663850Z [INFO] key [AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]], tags =\u003e [[DatedRevTag{id=1229a63c5f5878f2c1a653c352526d9560f0a725, tagName='refs/tags/0.0.1', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2668124Z [INFO] Created map: [{AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]=[0.0.0], AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]=[0.0.1]}]\r\n2023-05-31T15:21:05.2669862Z [INFO] Collected git.closest.tag.name with value \r\n2023-05-31T15:21:05.2684987Z [INFO] evalCommit is [7c96105d762080e184ff6f30ea916df36d50b628]\r\n2023-05-31T15:21:05.2693845Z [INFO] Tag refs [[Ref[refs/tags/0.0.0=e7b8e2074d25e947381d0ea2707ce4152e58fba3(-1)], Ref[refs/tags/0.0.1=1229a63c5f5878f2c1a653c352526d9560f0a725(-1)]]]\r\n2023-05-31T15:21:05.2696371Z [INFO] Including lightweight tag [refs/tags/0.0.0]\r\n2023-05-31T15:21:05.2700307Z [INFO] Including lightweight tag [refs/tags/0.0.1]\r\n2023-05-31T15:21:05.2705845Z [INFO] key [AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]], tags =\u003e [[DatedRevTag{id=e7b8e2074d25e947381d0ea2707ce4152e58fba3, tagName='refs/tags/0.0.0', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2710835Z [INFO] key [AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]], tags =\u003e [[DatedRevTag{id=1229a63c5f5878f2c1a653c352526d9560f0a725, tagName='refs/tags/0.0.1', date=May 31, 23 at 3:21:05 PM UTC}]] \r\n2023-05-31T15:21:05.2718239Z [INFO] Created map: [{AnyObjectId[e7b8e2074d25e947381d0ea2707ce4152e58fba3]=[0.0.0], AnyObjectId[1229a63c5f5878f2c1a653c352526d9560f0a725]=[0.0.1]}]\r\n2023-05-31T15:21:05.2719021Z [INFO] Collected git.closest.tag.commit.count with value \r\n2023-05-31T15:21:05.2725961Z [INFO] Collected git.build.time with value 2023-05-31T15:21:05+0000\r\n2023-05-31T15:21:05.2728070Z [INFO] Collected git.build.version with value 0.0.1-SNAPSHOT\r\n2023-05-31T15:21:05.2733056Z [INFO] including property 'git.tags' in results\r\n2023-05-31T15:21:05.2735283Z [INFO] including property 'git.closest.tag.commit.count' in results\r\n2023-05-31T15:21:05.2736941Z [INFO] including property 'git.build.version' in results\r\n2023-05-31T15:21:05.2737490Z [INFO] including property 'git.commit.id.full' in results\r\n2023-05-31T15:21:05.2738491Z [INFO] including property 'git.commit.id.abbrev' in results\r\n2023-05-31T15:21:05.2740243Z [INFO] including property 'git.closest.tag.name' in results\r\n2023-05-31T15:21:05.2741723Z [INFO] including property 'git.branch' in results\r\n2023-05-31T15:21:05.2743339Z [INFO] including property 'git.build.time' in results\r\n2023-05-31T15:21:05.2743769Z [INFO] including property 'git.dirty' in results\r\n2023-05-31T15:21:05.2747119Z [INFO] Reading existing properties file [/home/krupagj/azure-devops/_work/1/s/target/classes/git.properties] (for project demo)...\r\n2023-05-31T15:21:05.2756945Z [INFO] Properties file [/home/krupagj/azure-devops/_work/1/s/target/classes/git.properties] is up-to-date (for module demo)...\r\n```\r\n\r\n\r\n### Is there a (public) project where this issue can be reproduced? (optional)\r\n\r\n_No response_\r\n\r\n### Your Environment (optional)\r\n\r\nI have provisioned a Linux runner based on Ubuntu 20.04 with Java and Maven installed using apt\r\n\r\n### Context (optional)\r\n\r\n_No response_","author":{"url":"https://github.com/GJKrupa","@type":"Person","name":"GJKrupa"},"datePublished":"2023-06-01T08:40:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/239/git-commit-id-plugin-core/issues/239"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ade2e948-38f1-c188-f0d5-dca4c301dc20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0F0:131B5F:43DBDE:5571EA:69913FCD |
| html-safe-nonce | 146d8db92b398d8c3c5a4c0a72288a97747be81a7846f11c84f1720adde36825 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEYwOjEzMUI1Rjo0M0RCREU6NTU3MUVBOjY5OTEzRkNEIiwidmlzaXRvcl9pZCI6IjU5NTkzMDQ4MDQ3MTkyMTQ1NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3a5edf6a0e6bdd04dd829b88404005055fee50a78103c3a2c828aebf22859fed |
| hovercard-subject-tag | issue:3137802412 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/git-commit-id/git-commit-id-plugin-core/239/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4e6e97a0701a5816d7b1cc466f6a4286e1ebbac42de25cf0dbc8243a53abc9ff/git-commit-id/git-commit-id-plugin-core/issues/239 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e6e97a0701a5816d7b1cc466f6a4286e1ebbac42de25cf0dbc8243a53abc9ff/git-commit-id/git-commit-id-plugin-core/issues/239 |
| og:image:alt | Describe the bug (required) I have configured a Maven build to include tags and git.closest.tag.* values in git.properties. The verbose log shows that tags are being collected but the git.closest.t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GJKrupa |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/git-commit-id/git-commit-id-plugin-core git https://github.com/git-commit-id/git-commit-id-plugin-core.git |
| octolytics-dimension-user_id | 43124426 |
| octolytics-dimension-user_login | git-commit-id |
| octolytics-dimension-repository_id | 376144855 |
| octolytics-dimension-repository_nwo | git-commit-id/git-commit-id-plugin-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 376144855 |
| octolytics-dimension-repository_network_root_nwo | git-commit-id/git-commit-id-plugin-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width