#52 Include git commit on about page
Merged 2 years ago by hlin. Opened 2 years ago by hlin.
hlin/cts master  into  master

file modified
+3 -3
@@ -35,13 +35,13 @@ 

      checkout scm

      stage('Build Docker container') {

          def appversion = sh(returnStdout: true, script: './get-version.sh').trim()

+         // Inject appversion so that we can know which version of image is used via about page

+         sh """sed -i -e "s/version=.*/version='$appversion',/" setup.py"""

+ 

          /* Git builds will have a version like 0.3.2.dev1+git.3abbb08 following

           * the rules in PEP440. But Docker does not let us have + in the tag

           * name, so let's munge it here. */

          appversion = appversion.replace('+', '-')

-         /* Git builds will have a version like 0.3.2.dev1+git.3abbb08 following

-          * the rules in PEP440. But Docker does not let us have + in the tag

-          * name, so let's munge it here. */

          docker.withRegistry(

                  'https://docker-registry.upshift.redhat.com/',

                  'compose-upshift-registry-token') {

file modified
+1 -1
@@ -507,7 +507,7 @@ 

  

  

  def register_api_v1():

-     """ Registers version 1 of CTS API. """

+     """Registers version 1 of CTS API."""

      composes_view = CTSAPI.as_view("composes")

      tags_view = TagAPI.as_view("tags")

      about_view = AboutAPI.as_view("about")

file modified
+1 -1
@@ -6,7 +6,7 @@ 

  

  set -e

  

- name=greenwave

+ name=cts

  if [ "$(git tag | wc -l)" -eq 0 ] ; then

      # never been tagged since the project is just starting out

      lastversion="0.0"

JIRA: RHELCMP-2684
Signed-off-by: Haibo Lin hlin@redhat.com

rebased onto 8a63630815437f5a49fe8e31474f5b2309d7b334

2 years ago

Running the get-version.sh script I'm getting .1.dev58+git.8a63630 which looks slightly wrong. Maybe it's actually time to tag some version, which should fix that.

Running the get-version.sh script I'm getting .1.dev58+git.8a63630 which looks slightly wrong. Maybe it's actually time to tag some version, which should fix that.

yup, tag is needed by get-version.sh

rebased onto 55c4817

2 years ago

Pull-Request has been merged by hlin

2 years ago