From 6e42564cc6d550dc8d0d30555916a096a8c319a8 Mon Sep 17 00:00:00 2001
From: Jesus Federico <jesus@123it.ca>
Date: Mon, 4 Oct 2021 14:35:43 -0400
Subject: [PATCH] GRN2-XX: minor fixes for CI and alternate images (#2939)

* fixed issue with image tag on release

* fixed issue with ca certs on amazonlinux

* fixed issue with docker image release tag

* fixed issue with docker image release tag
---
 .github/workflows/ci.build.release.yml | 18 +++++++++---------
 dockerfiles/v2/amazonlinux             |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/ci.build.release.yml b/.github/workflows/ci.build.release.yml
index 0377cdfd..eeb9ccf3 100644
--- a/.github/workflows/ci.build.release.yml
+++ b/.github/workflows/ci.build.release.yml
@@ -45,11 +45,11 @@ jobs:
         shell: bash
         run: echo "##[set-output name=repository;]$(echo ${DOCKER_REPOSITORY:-$GITHUB_REPOSITORY})"
 
-      - name: Extract Tag Release
-        id: ci_tag_release
+      - name: Extract Tag Release Version
+        id: ci_tag_release_version
         if: contains(env.DOCKER_BUILD_ENABLED, 'true')
         shell: bash
-        run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
+        run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/} | cut -c 9-)"
 
       - name: Extract Tag Release Major
         id: ci_tag_release_major
@@ -69,11 +69,11 @@ jobs:
         with:
           push: true
           tags: |
-            "${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release.outputs.tag }}"
+            "${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}"
             "${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_major.outputs.tag }}"
             "${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_minor.outputs.tag }}"
             "${{ steps.ci_docker_repository.outputs.repository }}:latest"
-          build-args: "version_code=${{ steps.ci_tag_release_revision.outputs.tag }}"
+          build-args: "version_code=release-${{ steps.ci_tag_release_version.outputs.tag }}"
           cache-from: type=local,src=/tmp/.buildx-cache
           cache-to: type=local,dest=/tmp/.buildx-cache-new
 
@@ -85,8 +85,8 @@ jobs:
           file: dockerfiles/v2/alpine
           push: true
           tags: |
-            "${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release.outputs.tag }}-alpine"
-          build-args: "VERSION_CODE=${{ steps.ci_tag_release_revision.outputs.tag }}"
+            "${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}-alpine"
+          build-args: "VERSION_CODE=release-${{ steps.ci_tag_release_version.outputs.tag }}"
           cache-from: type=local,src=/tmp/.buildx-cache
           cache-to: type=local,dest=/tmp/.buildx-cache-new
 
@@ -98,8 +98,8 @@ jobs:
           file: dockerfiles/v2/amazonlinux
           push: true
           tags: |
-            "${{ steps.ci_docker_repository.outputs.repository }}:${{ steps.ci_tag_release.outputs.tag }}-amazonlinux"
-          build-args: "VERSION_CODE=${{ steps.ci_tag_release_revision.outputs.tag }}"
+            "${{ steps.ci_docker_repository.outputs.repository }}:v${{ steps.ci_tag_release_version.outputs.tag }}-amazonlinux"
+          build-args: "VERSION_CODE=release-${{ steps.ci_tag_release_version.outputs.tag }}"
           cache-from: type=local,src=/tmp/.buildx-cache
           cache-to: type=local,dest=/tmp/.buildx-cache-new
 
diff --git a/dockerfiles/v2/amazonlinux b/dockerfiles/v2/amazonlinux
index cf18625d..4928d7fb 100644
--- a/dockerfiles/v2/amazonlinux
+++ b/dockerfiles/v2/amazonlinux
@@ -45,7 +45,7 @@ EXPOSE 80
 
 # FIXME / to remove / https://github.com/nahi/httpclient/issues/445
 RUN cat /etc/ssl/certs/ca-bundle.crt \
-    >/usr/src/app/vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem
+    >/usr/src/app/vendor/bundle/ruby/2.6.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem
 
 RUN chmod +x bin/start
 CMD [ "bin/start" ]
-- 
GitLab