From 66324afccb247bf255036a8432cdc7db956c9c3b Mon Sep 17 00:00:00 2001 From: Abhilash Date: Mon, 23 Feb 2026 15:41:02 +0530 Subject: [PATCH] chore: updated the offline cache logic to respect skip-cahce config --- .tekton/pipeline/default-pipeline.yaml | 152 +++++++++--------- .../tasks/test-groups/autoprofile-task.yaml | 48 +++--- .../tasks/test-groups/aws-fargate-task.yaml | 48 +++--- .../test-groups/aws-lambda-split-2-task.yaml | 48 +++--- .../test-groups/aws-lambda-split-3-task.yaml | 48 +++--- .../test-groups/aws-lambda-split-4-task.yaml | 48 +++--- .../test-groups/aws-lambda-split-5-task.yaml | 48 +++--- .../tasks/test-groups/aws-lambda-task.yaml | 48 +++--- .../azure-container-services-task.yaml | 48 +++--- .../test-groups/collector-1-redis-task.yaml | 48 +++--- .../test-groups/collector-10-redis-task.yaml | 48 +++--- .../test-groups/collector-11-redis-task.yaml | 48 +++--- .../test-groups/collector-12-redis-task.yaml | 48 +++--- .../test-groups/collector-13-redis-task.yaml | 48 +++--- .../test-groups/collector-14-redis-task.yaml | 48 +++--- .../test-groups/collector-15-redis-task.yaml | 48 +++--- .../test-groups/collector-16-redis-task.yaml | 48 +++--- .../test-groups/collector-17-redis-task.yaml | 48 +++--- .../test-groups/collector-18-redis-task.yaml | 48 +++--- .../test-groups/collector-19-redis-task.yaml | 48 +++--- .../test-groups/collector-2-redis-task.yaml | 48 +++--- .../test-groups/collector-20-redis-task.yaml | 48 +++--- .../test-groups/collector-21-kafka-task.yaml | 48 +++--- .../test-groups/collector-22-kafka-task.yaml | 48 +++--- .../test-groups/collector-23-kafka-task.yaml | 48 +++--- .../test-groups/collector-24-kafka-task.yaml | 48 +++--- .../test-groups/collector-25-kafka-task.yaml | 48 +++--- .../test-groups/collector-26-kafka-task.yaml | 48 +++--- .../collector-27-postgres-task.yaml | 48 +++--- .../collector-28-postgres-task.yaml | 48 +++--- .../collector-29-postgres-task.yaml | 48 +++--- .../test-groups/collector-3-redis-task.yaml | 48 +++--- .../collector-30-elasticsearch-task.yaml | 48 +++--- .../collector-31-elasticsearch-task.yaml | 48 +++--- .../collector-32-mongodb-task.yaml | 48 +++--- .../collector-33-couchbase-task.yaml | 48 +++--- .../collector-34-rabbitmq-task.yaml | 48 +++--- .../test-groups/collector-35-nats-task.yaml | 48 +++--- .../test-groups/collector-36-mysql-task.yaml | 48 +++--- .../collector-37-localstack-task.yaml | 48 +++--- .../collector-38-memcached-task.yaml | 48 +++--- .../collector-39-oracledb-task.yaml | 48 +++--- .../test-groups/collector-4-redis-task.yaml | 48 +++--- .../test-groups/collector-5-redis-task.yaml | 48 +++--- .../test-groups/collector-6-redis-task.yaml | 48 +++--- .../test-groups/collector-7-redis-task.yaml | 48 +++--- .../test-groups/collector-8-redis-task.yaml | 48 +++--- .../test-groups/collector-9-redis-task.yaml | 48 +++--- .tekton/tasks/test-groups/core-task.yaml | 48 +++--- .../test-groups/google-cloud-run-task.yaml | 48 +++--- .../tasks/test-groups/metrics-util-task.yaml | 48 +++--- .../opentelemetry-exporter-task.yaml | 48 +++--- .../opentelemetry-sampler-task.yaml | 48 +++--- .../serverless-collector-task.yaml | 48 +++--- .../tasks/test-groups/serverless-task.yaml | 48 +++--- .../test-groups/shared-metrics-task.yaml | 48 +++--- .tekton/templates/test-task.yaml.template | 56 ++++--- 57 files changed, 1592 insertions(+), 1256 deletions(-) diff --git a/.tekton/pipeline/default-pipeline.yaml b/.tekton/pipeline/default-pipeline.yaml index 45109436e6..a035793e9b 100644 --- a/.tekton/pipeline/default-pipeline.yaml +++ b/.tekton/pipeline/default-pipeline.yaml @@ -418,11 +418,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-10-redis-task + - name: collector-2-redis-task runAfter: - execute-tools taskRef: - name: collector-10-redis + name: collector-2-redis params: - name: node-version value: $(params.node-version) @@ -443,11 +443,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-11-redis-task + - name: collector-3-redis-task runAfter: - execute-tools taskRef: - name: collector-11-redis + name: collector-3-redis params: - name: node-version value: $(params.node-version) @@ -468,11 +468,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-12-redis-task + - name: collector-4-redis-task runAfter: - execute-tools taskRef: - name: collector-12-redis + name: collector-4-redis params: - name: node-version value: $(params.node-version) @@ -493,11 +493,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-13-redis-task + - name: collector-5-redis-task runAfter: - execute-tools taskRef: - name: collector-13-redis + name: collector-5-redis params: - name: node-version value: $(params.node-version) @@ -518,11 +518,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-14-redis-task + - name: collector-6-redis-task runAfter: - execute-tools taskRef: - name: collector-14-redis + name: collector-6-redis params: - name: node-version value: $(params.node-version) @@ -543,11 +543,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-15-redis-task + - name: collector-7-redis-task runAfter: - execute-tools taskRef: - name: collector-15-redis + name: collector-7-redis params: - name: node-version value: $(params.node-version) @@ -568,11 +568,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-16-redis-task + - name: collector-8-redis-task runAfter: - execute-tools taskRef: - name: collector-16-redis + name: collector-8-redis params: - name: node-version value: $(params.node-version) @@ -593,11 +593,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-17-redis-task + - name: collector-9-redis-task runAfter: - execute-tools taskRef: - name: collector-17-redis + name: collector-9-redis params: - name: node-version value: $(params.node-version) @@ -618,11 +618,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-18-redis-task + - name: collector-10-redis-task runAfter: - execute-tools taskRef: - name: collector-18-redis + name: collector-10-redis params: - name: node-version value: $(params.node-version) @@ -643,11 +643,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-19-redis-task + - name: collector-11-redis-task runAfter: - execute-tools taskRef: - name: collector-19-redis + name: collector-11-redis params: - name: node-version value: $(params.node-version) @@ -668,11 +668,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-2-redis-task + - name: collector-12-redis-task runAfter: - execute-tools taskRef: - name: collector-2-redis + name: collector-12-redis params: - name: node-version value: $(params.node-version) @@ -693,11 +693,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-20-redis-task + - name: collector-13-redis-task runAfter: - execute-tools taskRef: - name: collector-20-redis + name: collector-13-redis params: - name: node-version value: $(params.node-version) @@ -718,11 +718,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-21-kafka-task + - name: collector-14-redis-task runAfter: - execute-tools taskRef: - name: collector-21-kafka + name: collector-14-redis params: - name: node-version value: $(params.node-version) @@ -743,11 +743,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-22-kafka-task + - name: collector-15-redis-task runAfter: - execute-tools taskRef: - name: collector-22-kafka + name: collector-15-redis params: - name: node-version value: $(params.node-version) @@ -768,11 +768,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-23-kafka-task + - name: collector-16-redis-task runAfter: - execute-tools taskRef: - name: collector-23-kafka + name: collector-16-redis params: - name: node-version value: $(params.node-version) @@ -793,11 +793,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-24-kafka-task + - name: collector-17-redis-task runAfter: - execute-tools taskRef: - name: collector-24-kafka + name: collector-17-redis params: - name: node-version value: $(params.node-version) @@ -818,11 +818,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-25-kafka-task + - name: collector-18-redis-task runAfter: - execute-tools taskRef: - name: collector-25-kafka + name: collector-18-redis params: - name: node-version value: $(params.node-version) @@ -843,11 +843,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-26-kafka-task + - name: collector-19-redis-task runAfter: - execute-tools taskRef: - name: collector-26-kafka + name: collector-19-redis params: - name: node-version value: $(params.node-version) @@ -868,11 +868,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-27-postgres-task + - name: collector-20-redis-task runAfter: - execute-tools taskRef: - name: collector-27-postgres + name: collector-20-redis params: - name: node-version value: $(params.node-version) @@ -893,11 +893,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-28-postgres-task + - name: collector-21-kafka-task runAfter: - execute-tools taskRef: - name: collector-28-postgres + name: collector-21-kafka params: - name: node-version value: $(params.node-version) @@ -918,11 +918,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-29-postgres-task + - name: collector-22-kafka-task runAfter: - execute-tools taskRef: - name: collector-29-postgres + name: collector-22-kafka params: - name: node-version value: $(params.node-version) @@ -943,11 +943,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-3-redis-task + - name: collector-23-kafka-task runAfter: - execute-tools taskRef: - name: collector-3-redis + name: collector-23-kafka params: - name: node-version value: $(params.node-version) @@ -968,11 +968,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-30-elasticsearch-task + - name: collector-24-kafka-task runAfter: - execute-tools taskRef: - name: collector-30-elasticsearch + name: collector-24-kafka params: - name: node-version value: $(params.node-version) @@ -993,11 +993,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-31-elasticsearch-task + - name: collector-25-kafka-task runAfter: - execute-tools taskRef: - name: collector-31-elasticsearch + name: collector-25-kafka params: - name: node-version value: $(params.node-version) @@ -1018,11 +1018,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-32-mongodb-task + - name: collector-26-kafka-task runAfter: - execute-tools taskRef: - name: collector-32-mongodb + name: collector-26-kafka params: - name: node-version value: $(params.node-version) @@ -1043,11 +1043,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-33-couchbase-task + - name: collector-27-postgres-task runAfter: - execute-tools taskRef: - name: collector-33-couchbase + name: collector-27-postgres params: - name: node-version value: $(params.node-version) @@ -1068,11 +1068,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-34-rabbitmq-task + - name: collector-28-postgres-task runAfter: - execute-tools taskRef: - name: collector-34-rabbitmq + name: collector-28-postgres params: - name: node-version value: $(params.node-version) @@ -1093,11 +1093,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-35-nats-task + - name: collector-29-postgres-task runAfter: - execute-tools taskRef: - name: collector-35-nats + name: collector-29-postgres params: - name: node-version value: $(params.node-version) @@ -1118,11 +1118,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-36-mysql-task + - name: collector-30-elasticsearch-task runAfter: - execute-tools taskRef: - name: collector-36-mysql + name: collector-30-elasticsearch params: - name: node-version value: $(params.node-version) @@ -1143,11 +1143,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-37-localstack-task + - name: collector-31-elasticsearch-task runAfter: - execute-tools taskRef: - name: collector-37-localstack + name: collector-31-elasticsearch params: - name: node-version value: $(params.node-version) @@ -1168,11 +1168,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-38-memcached-task + - name: collector-32-mongodb-task runAfter: - execute-tools taskRef: - name: collector-38-memcached + name: collector-32-mongodb params: - name: node-version value: $(params.node-version) @@ -1193,11 +1193,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-39-oracledb-task + - name: collector-33-couchbase-task runAfter: - execute-tools taskRef: - name: collector-39-oracledb + name: collector-33-couchbase params: - name: node-version value: $(params.node-version) @@ -1218,11 +1218,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-4-redis-task + - name: collector-34-rabbitmq-task runAfter: - execute-tools taskRef: - name: collector-4-redis + name: collector-34-rabbitmq params: - name: node-version value: $(params.node-version) @@ -1243,11 +1243,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-5-redis-task + - name: collector-35-nats-task runAfter: - execute-tools taskRef: - name: collector-5-redis + name: collector-35-nats params: - name: node-version value: $(params.node-version) @@ -1268,11 +1268,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-6-redis-task + - name: collector-36-mysql-task runAfter: - execute-tools taskRef: - name: collector-6-redis + name: collector-36-mysql params: - name: node-version value: $(params.node-version) @@ -1293,11 +1293,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-7-redis-task + - name: collector-37-localstack-task runAfter: - execute-tools taskRef: - name: collector-7-redis + name: collector-37-localstack params: - name: node-version value: $(params.node-version) @@ -1318,11 +1318,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-8-redis-task + - name: collector-38-memcached-task runAfter: - execute-tools taskRef: - name: collector-8-redis + name: collector-38-memcached params: - name: node-version value: $(params.node-version) @@ -1343,11 +1343,11 @@ spec: workspaces: - name: output workspace: artifacts - - name: collector-9-redis-task + - name: collector-39-oracledb-task runAfter: - execute-tools taskRef: - name: collector-9-redis + name: collector-39-oracledb params: - name: node-version value: $(params.node-version) diff --git a/.tekton/tasks/test-groups/autoprofile-task.yaml b/.tekton/tasks/test-groups/autoprofile-task.yaml index 7c9cf8bd44..029eef0d3f 100644 --- a/.tekton/tasks/test-groups/autoprofile-task.yaml +++ b/.tekton/tasks/test-groups/autoprofile-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-fargate-task.yaml b/.tekton/tasks/test-groups/aws-fargate-task.yaml index 022ad0f30c..f63477095b 100644 --- a/.tekton/tasks/test-groups/aws-fargate-task.yaml +++ b/.tekton/tasks/test-groups/aws-fargate-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-lambda-split-2-task.yaml b/.tekton/tasks/test-groups/aws-lambda-split-2-task.yaml index 76bd4b96a7..01d5c5bc05 100644 --- a/.tekton/tasks/test-groups/aws-lambda-split-2-task.yaml +++ b/.tekton/tasks/test-groups/aws-lambda-split-2-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-lambda-split-3-task.yaml b/.tekton/tasks/test-groups/aws-lambda-split-3-task.yaml index f345b6e5b6..e20d7ddaaa 100644 --- a/.tekton/tasks/test-groups/aws-lambda-split-3-task.yaml +++ b/.tekton/tasks/test-groups/aws-lambda-split-3-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-lambda-split-4-task.yaml b/.tekton/tasks/test-groups/aws-lambda-split-4-task.yaml index 5eda30d345..88d71b243e 100644 --- a/.tekton/tasks/test-groups/aws-lambda-split-4-task.yaml +++ b/.tekton/tasks/test-groups/aws-lambda-split-4-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-lambda-split-5-task.yaml b/.tekton/tasks/test-groups/aws-lambda-split-5-task.yaml index 269bad9576..5174ed6a5f 100644 --- a/.tekton/tasks/test-groups/aws-lambda-split-5-task.yaml +++ b/.tekton/tasks/test-groups/aws-lambda-split-5-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/aws-lambda-task.yaml b/.tekton/tasks/test-groups/aws-lambda-task.yaml index ad6c53a968..cdebc59c55 100644 --- a/.tekton/tasks/test-groups/aws-lambda-task.yaml +++ b/.tekton/tasks/test-groups/aws-lambda-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/azure-container-services-task.yaml b/.tekton/tasks/test-groups/azure-container-services-task.yaml index dea3c74db1..09fd5d13e3 100644 --- a/.tekton/tasks/test-groups/azure-container-services-task.yaml +++ b/.tekton/tasks/test-groups/azure-container-services-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-1-redis-task.yaml b/.tekton/tasks/test-groups/collector-1-redis-task.yaml index 8a9a1d9efa..9c5a04d545 100644 --- a/.tekton/tasks/test-groups/collector-1-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-1-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-10-redis-task.yaml b/.tekton/tasks/test-groups/collector-10-redis-task.yaml index 274b4cd62e..3de8ba8f38 100644 --- a/.tekton/tasks/test-groups/collector-10-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-10-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-11-redis-task.yaml b/.tekton/tasks/test-groups/collector-11-redis-task.yaml index ecb0643235..151a56761a 100644 --- a/.tekton/tasks/test-groups/collector-11-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-11-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-12-redis-task.yaml b/.tekton/tasks/test-groups/collector-12-redis-task.yaml index f451988f6b..a1cf863bae 100644 --- a/.tekton/tasks/test-groups/collector-12-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-12-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-13-redis-task.yaml b/.tekton/tasks/test-groups/collector-13-redis-task.yaml index 8f8ed5767b..a33d9b9bbd 100644 --- a/.tekton/tasks/test-groups/collector-13-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-13-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-14-redis-task.yaml b/.tekton/tasks/test-groups/collector-14-redis-task.yaml index bdcd08ca56..3056bb6f7c 100644 --- a/.tekton/tasks/test-groups/collector-14-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-14-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-15-redis-task.yaml b/.tekton/tasks/test-groups/collector-15-redis-task.yaml index e9078df57b..12867a434b 100644 --- a/.tekton/tasks/test-groups/collector-15-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-15-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-16-redis-task.yaml b/.tekton/tasks/test-groups/collector-16-redis-task.yaml index b3f6a85ac6..e6e5bad671 100644 --- a/.tekton/tasks/test-groups/collector-16-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-16-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-17-redis-task.yaml b/.tekton/tasks/test-groups/collector-17-redis-task.yaml index 889526997d..a9be42163e 100644 --- a/.tekton/tasks/test-groups/collector-17-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-17-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-18-redis-task.yaml b/.tekton/tasks/test-groups/collector-18-redis-task.yaml index c9b3996c19..1141aff386 100644 --- a/.tekton/tasks/test-groups/collector-18-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-18-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-19-redis-task.yaml b/.tekton/tasks/test-groups/collector-19-redis-task.yaml index 66f8b4fc70..b7caf78954 100644 --- a/.tekton/tasks/test-groups/collector-19-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-19-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-2-redis-task.yaml b/.tekton/tasks/test-groups/collector-2-redis-task.yaml index d760ee2ccb..46b365c7db 100644 --- a/.tekton/tasks/test-groups/collector-2-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-2-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-20-redis-task.yaml b/.tekton/tasks/test-groups/collector-20-redis-task.yaml index 4677214872..fdfa21370c 100644 --- a/.tekton/tasks/test-groups/collector-20-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-20-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-21-kafka-task.yaml b/.tekton/tasks/test-groups/collector-21-kafka-task.yaml index 0eec4837c8..dcfd482ac2 100644 --- a/.tekton/tasks/test-groups/collector-21-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-21-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-22-kafka-task.yaml b/.tekton/tasks/test-groups/collector-22-kafka-task.yaml index 4e518f232f..147c9a44d8 100644 --- a/.tekton/tasks/test-groups/collector-22-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-22-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-23-kafka-task.yaml b/.tekton/tasks/test-groups/collector-23-kafka-task.yaml index d6aef1949b..eccfc60067 100644 --- a/.tekton/tasks/test-groups/collector-23-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-23-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-24-kafka-task.yaml b/.tekton/tasks/test-groups/collector-24-kafka-task.yaml index 31715010ab..83f3e58cba 100644 --- a/.tekton/tasks/test-groups/collector-24-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-24-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-25-kafka-task.yaml b/.tekton/tasks/test-groups/collector-25-kafka-task.yaml index 0162f10bde..9ca9fdc9e7 100644 --- a/.tekton/tasks/test-groups/collector-25-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-25-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-26-kafka-task.yaml b/.tekton/tasks/test-groups/collector-26-kafka-task.yaml index 554082406a..6ae1cda676 100644 --- a/.tekton/tasks/test-groups/collector-26-kafka-task.yaml +++ b/.tekton/tasks/test-groups/collector-26-kafka-task.yaml @@ -105,6 +105,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -179,27 +181,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-27-postgres-task.yaml b/.tekton/tasks/test-groups/collector-27-postgres-task.yaml index ad49c7500a..7c987add36 100644 --- a/.tekton/tasks/test-groups/collector-27-postgres-task.yaml +++ b/.tekton/tasks/test-groups/collector-27-postgres-task.yaml @@ -47,6 +47,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -121,27 +123,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-28-postgres-task.yaml b/.tekton/tasks/test-groups/collector-28-postgres-task.yaml index 89d9f21267..2ac2259e44 100644 --- a/.tekton/tasks/test-groups/collector-28-postgres-task.yaml +++ b/.tekton/tasks/test-groups/collector-28-postgres-task.yaml @@ -47,6 +47,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -121,27 +123,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-29-postgres-task.yaml b/.tekton/tasks/test-groups/collector-29-postgres-task.yaml index c75add08c8..df2e14e429 100644 --- a/.tekton/tasks/test-groups/collector-29-postgres-task.yaml +++ b/.tekton/tasks/test-groups/collector-29-postgres-task.yaml @@ -47,6 +47,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -121,27 +123,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-3-redis-task.yaml b/.tekton/tasks/test-groups/collector-3-redis-task.yaml index dce0f3c314..303fcc5831 100644 --- a/.tekton/tasks/test-groups/collector-3-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-3-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-30-elasticsearch-task.yaml b/.tekton/tasks/test-groups/collector-30-elasticsearch-task.yaml index 8ea0970e60..5f2e959074 100644 --- a/.tekton/tasks/test-groups/collector-30-elasticsearch-task.yaml +++ b/.tekton/tasks/test-groups/collector-30-elasticsearch-task.yaml @@ -38,6 +38,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -112,27 +114,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-31-elasticsearch-task.yaml b/.tekton/tasks/test-groups/collector-31-elasticsearch-task.yaml index 73965c3ccd..0f0ee58ac7 100644 --- a/.tekton/tasks/test-groups/collector-31-elasticsearch-task.yaml +++ b/.tekton/tasks/test-groups/collector-31-elasticsearch-task.yaml @@ -38,6 +38,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -112,27 +114,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-32-mongodb-task.yaml b/.tekton/tasks/test-groups/collector-32-mongodb-task.yaml index 13c98da114..e52346c371 100644 --- a/.tekton/tasks/test-groups/collector-32-mongodb-task.yaml +++ b/.tekton/tasks/test-groups/collector-32-mongodb-task.yaml @@ -31,6 +31,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -105,27 +107,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-33-couchbase-task.yaml b/.tekton/tasks/test-groups/collector-33-couchbase-task.yaml index 3f2d18c954..136fd8dca6 100644 --- a/.tekton/tasks/test-groups/collector-33-couchbase-task.yaml +++ b/.tekton/tasks/test-groups/collector-33-couchbase-task.yaml @@ -38,6 +38,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -112,27 +114,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-34-rabbitmq-task.yaml b/.tekton/tasks/test-groups/collector-34-rabbitmq-task.yaml index 1ceb6a690c..df80969989 100644 --- a/.tekton/tasks/test-groups/collector-34-rabbitmq-task.yaml +++ b/.tekton/tasks/test-groups/collector-34-rabbitmq-task.yaml @@ -37,6 +37,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -111,27 +113,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-35-nats-task.yaml b/.tekton/tasks/test-groups/collector-35-nats-task.yaml index d751810428..4fec7a53d4 100644 --- a/.tekton/tasks/test-groups/collector-35-nats-task.yaml +++ b/.tekton/tasks/test-groups/collector-35-nats-task.yaml @@ -69,6 +69,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -143,27 +145,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-36-mysql-task.yaml b/.tekton/tasks/test-groups/collector-36-mysql-task.yaml index 08f6439ac8..c5d72a09b6 100644 --- a/.tekton/tasks/test-groups/collector-36-mysql-task.yaml +++ b/.tekton/tasks/test-groups/collector-36-mysql-task.yaml @@ -53,6 +53,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -127,27 +129,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-37-localstack-task.yaml b/.tekton/tasks/test-groups/collector-37-localstack-task.yaml index 6db46a6ec0..2a2001b0b1 100644 --- a/.tekton/tasks/test-groups/collector-37-localstack-task.yaml +++ b/.tekton/tasks/test-groups/collector-37-localstack-task.yaml @@ -31,6 +31,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -105,27 +107,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-38-memcached-task.yaml b/.tekton/tasks/test-groups/collector-38-memcached-task.yaml index e6e72dcab0..59d1fc995e 100644 --- a/.tekton/tasks/test-groups/collector-38-memcached-task.yaml +++ b/.tekton/tasks/test-groups/collector-38-memcached-task.yaml @@ -31,6 +31,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -105,27 +107,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-39-oracledb-task.yaml b/.tekton/tasks/test-groups/collector-39-oracledb-task.yaml index cd5cabd18c..9766b9a69f 100644 --- a/.tekton/tasks/test-groups/collector-39-oracledb-task.yaml +++ b/.tekton/tasks/test-groups/collector-39-oracledb-task.yaml @@ -34,6 +34,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -108,27 +110,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-4-redis-task.yaml b/.tekton/tasks/test-groups/collector-4-redis-task.yaml index c22ef27abb..ac4ba1fdd0 100644 --- a/.tekton/tasks/test-groups/collector-4-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-4-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-5-redis-task.yaml b/.tekton/tasks/test-groups/collector-5-redis-task.yaml index cc60a0987e..a305c1186f 100644 --- a/.tekton/tasks/test-groups/collector-5-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-5-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-6-redis-task.yaml b/.tekton/tasks/test-groups/collector-6-redis-task.yaml index f309341b1e..6f9243fb1f 100644 --- a/.tekton/tasks/test-groups/collector-6-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-6-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-7-redis-task.yaml b/.tekton/tasks/test-groups/collector-7-redis-task.yaml index 29709f80f7..270e1fe69f 100644 --- a/.tekton/tasks/test-groups/collector-7-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-7-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-8-redis-task.yaml b/.tekton/tasks/test-groups/collector-8-redis-task.yaml index 40d1a50cb3..d9975dd693 100644 --- a/.tekton/tasks/test-groups/collector-8-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-8-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/collector-9-redis-task.yaml b/.tekton/tasks/test-groups/collector-9-redis-task.yaml index c2625a0874..14ccd09337 100644 --- a/.tekton/tasks/test-groups/collector-9-redis-task.yaml +++ b/.tekton/tasks/test-groups/collector-9-redis-task.yaml @@ -62,6 +62,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -136,27 +138,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/core-task.yaml b/.tekton/tasks/test-groups/core-task.yaml index c1566c46d7..00589972e5 100644 --- a/.tekton/tasks/test-groups/core-task.yaml +++ b/.tekton/tasks/test-groups/core-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/google-cloud-run-task.yaml b/.tekton/tasks/test-groups/google-cloud-run-task.yaml index 619ff27764..17160b5916 100644 --- a/.tekton/tasks/test-groups/google-cloud-run-task.yaml +++ b/.tekton/tasks/test-groups/google-cloud-run-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/metrics-util-task.yaml b/.tekton/tasks/test-groups/metrics-util-task.yaml index 52a15c83c6..82930cab04 100644 --- a/.tekton/tasks/test-groups/metrics-util-task.yaml +++ b/.tekton/tasks/test-groups/metrics-util-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/opentelemetry-exporter-task.yaml b/.tekton/tasks/test-groups/opentelemetry-exporter-task.yaml index 0b5d4e6f58..d6b16109b3 100644 --- a/.tekton/tasks/test-groups/opentelemetry-exporter-task.yaml +++ b/.tekton/tasks/test-groups/opentelemetry-exporter-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/opentelemetry-sampler-task.yaml b/.tekton/tasks/test-groups/opentelemetry-sampler-task.yaml index fafe29f93f..8e82515946 100644 --- a/.tekton/tasks/test-groups/opentelemetry-sampler-task.yaml +++ b/.tekton/tasks/test-groups/opentelemetry-sampler-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/serverless-collector-task.yaml b/.tekton/tasks/test-groups/serverless-collector-task.yaml index a350087e73..eb7f7c7865 100644 --- a/.tekton/tasks/test-groups/serverless-collector-task.yaml +++ b/.tekton/tasks/test-groups/serverless-collector-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/serverless-task.yaml b/.tekton/tasks/test-groups/serverless-task.yaml index 2c4296a0e6..b7eecc1af8 100644 --- a/.tekton/tasks/test-groups/serverless-task.yaml +++ b/.tekton/tasks/test-groups/serverless-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/tasks/test-groups/shared-metrics-task.yaml b/.tekton/tasks/test-groups/shared-metrics-task.yaml index 2b9611db48..90875f358b 100644 --- a/.tekton/tasks/test-groups/shared-metrics-task.yaml +++ b/.tekton/tasks/test-groups/shared-metrics-task.yaml @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -98,27 +100,31 @@ spec: npm config set fetch-retry-mintimeout 20000 npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi if [ -n "$(params.revision)" ]; then diff --git a/.tekton/templates/test-task.yaml.template b/.tekton/templates/test-task.yaml.template index 3b65ed6f87..19dd12f6ef 100644 --- a/.tekton/templates/test-task.yaml.template +++ b/.tekton/templates/test-task.yaml.template @@ -24,6 +24,8 @@ spec: value: $(params.coverage) - name: prerelease value: $(params.prerelease) + - name: skip-cache + value: $(params.skip-cache) workspaces: - name: output mountPath: /artifacts @@ -104,31 +106,35 @@ spec: npm config set fetch-retry-maxtimeout 120000 npm config set maxsockets 5 - if [ ! -d ".npm-offline-cache" ]; then - mkdir .npm-offline-cache - - # Try to download daily cache - TODAY=$(date +%F) - CACHE_KEY="npm-cache-apps-$TODAY" - echo "Attempting to download daily cache: $CACHE_KEY" - - # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) - # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. - # install-project-dependencies.yaml installs it. - # We should probably do the same here. - - curl -fsSL https://clis.cloud.ibm.com/install/linux | sh - ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' - ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY - - if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then - echo "Downloaded daily cache." - apt-get update -y && apt-get install -y zstd - zstd -d npm-cache.tar.zst -o npm-cache.tar - tar -xf npm-cache.tar - rm npm-cache.tar npm-cache.tar.zst - else - echo "Daily cache not found. Proceeding with empty cache." + if [ "$(params.skip-cache)" == "true" ]; then + echo "Skipping npm-offline-cache (skip-cache=true). Installing dependencies freshly..." + else + if [ ! -d ".npm-offline-cache" ]; then + mkdir .npm-offline-cache + + # Try to download daily cache + TODAY=$(date +%F) + CACHE_KEY="npm-cache-apps-$TODAY" + echo "Attempting to download daily cache: $CACHE_KEY" + + # Install IBM Cloud CLI if needed (it might not be in the image, check if we need to install it or if we can use curl/wget if the bucket is public? No, it's private likely. The install-project-dependencies task installs it.) + # Wait, this script runs inside the test container which is `node:version`. It probably doesn't have ibmcloud cli. + # install-project-dependencies.yaml installs it. + # We should probably do the same here. + + curl -fsSL https://clis.cloud.ibm.com/install/linux | sh + ibmcloud plugin install cloud-object-storage -f -r 'IBM Cloud' + ibmcloud login -a https://cloud.ibm.com -r eu-de --apikey $API_KEY + + if ibmcloud cos download --bucket npm-cache --key "$CACHE_KEY.tar.zst" "npm-cache.tar.zst"; then + echo "Downloaded daily cache." + apt-get update -y && apt-get install -y zstd + zstd -d npm-cache.tar.zst -o npm-cache.tar + tar -xf npm-cache.tar + rm npm-cache.tar npm-cache.tar.zst + else + echo "Daily cache not found. Proceeding with empty cache." + fi fi fi