Skip to content

Add build info to container image

Arturo Hernandez [EPAM] requested to merge cicd/add_code_info_container into main

Type of change

  • [NA] Bug Fix
  • [NA] Feature

Does this introduce a change in the core logic?

  • [No]

Does this introduce a change in the cloud provider implementation, and if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Does this introduce a change that must be documented in the README.md file?

  • [No]

Updates description?

This was originally raised by Benjamin Lagrone, I cannot find him as part of the community to include him in this MR, it is not a functional change but only informative.

When endpoint /info it is used, we get:

{
    "name": "Rock and Fluid Sample DDMS",
    "version": "0.1.0",
    "build_time": "",
    "branch": "",
    "commit_id": "",
    "commit_message": ""
}

This will add the variables needed and fix the issue to get proper information:

{
    "name": "Rock and Fluid Sample DDMS",
    "api_version": "0.1.0",
    "build_time": "Mon Jul 17 16:36:58 UTC 2023",
    "branch": "trusted-cicd-add-code-info-container",
    "commit_id": "317f306d",
    "commit_message": "Add version parameter\n",
    "release_version": "0.0.0-317f306d"
}

For tag and branch pipelines:

{
    "name": "Rock and Fluid Sample DDMS",
    "api_version": "0.1.0",
    "build_time": "Mon Jul 17 16:36:58 UTC 2023",
    "branch": "v0.22.0",
    "commit_id": "317f306d",
    "commit_message": "Add version parameter\n",
    "release_version": "0.22.0"
}
Edited by Arturo Hernandez [EPAM]

Merge request reports

Loading