Make branch number extractable from github environment on pipeline to push image from dev branch to GCR

XMLWordPrintable

    • Type: Task
    • Resolution: Unresolved
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: backend
    • None
    • Not defined

      Currently, our Github Actions pipeline with name *push-dev-branch-image.yml * contains the following snippet of code, which hard codes the version of Optimize:

                echo "docker_image=gcr.io/${{ steps.auth.outputs.project_id }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.image_tag }}" >> "$GITHUB_OUTPUT"
      
      

      Ideally we would like to find a way to extract the number of a branch from the environment variable without having to input it as an input variable on the pipeline.

      ATs:

      • There is no input variable anymore for the image tag
      • The image tag, strips the branch number read from the github env (for instance OPT-1111 will become 1111) and attaches it to the release version like so: 3.OPTIMIZE-VERSION-1111-SNAPSHOT

            Assignee:
            Unassigned
            Reporter:
            Andromachi Rozaki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: