Commit 9b90dfd9 authored by Guilhem Bonnefille's avatar Guilhem Bonnefille
Browse files

fix: process only variables concerning images

Should terminate with `_IMAGE`.
parent 76ebbfed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -253,10 +253,10 @@ function process_default_images() {
  {
    # base images
    jq -r '.templates[] |
      "\(.name)|main|\(.variables[]? | select(.name | test(".*_IMAGE")) | "\(.name)|\(.default)")"' "$JSON_OUT"
      "\(.name)|main|\(.variables[]? | select(.name | test(".*_IMAGE$")) | "\(.name)|\(.default)")"' "$JSON_OUT"
    # features images
    jq -r '.templates[] |
        "\(.name)|feat|\(.features[]? | .variables[]? | select(.name | test(".*_IMAGE")) | "\(.name)|\(.default)")"' "$JSON_OUT"
        "\(.name)|feat|\(.features[]? | .variables[]? | select(.name | test(".*_IMAGE$")) | "\(.name)|\(.default)")"' "$JSON_OUT"
  } | awk '!/(\|null$|\$CI_REGISTRY_IMAGE)/{print}' > $IMAGES_OUT
  # exclude 'null' images or images containing '$CI_REGISTRY_IMAGE'