From 464c51f2cbc28f8e469e9208047eb16da3e425be Mon Sep 17 00:00:00 2001 From: Abhilash Date: Mon, 28 Oct 2024 20:16:41 +0530 Subject: [PATCH] ci: fix learna not found issue by forcefully installing lerna if not found --- .tekton/tasks/test-groups/test-ci-autoprofile-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml | 4 ++++ .../test-groups/test-ci-azure-container-services-task.yaml | 4 ++++ .../tasks/test-groups/test-ci-collector-general-task.yaml | 4 ++++ .../test-ci-collector-tracing-cloud-aws-v2-task.yaml | 4 ++++ .../test-ci-collector-tracing-cloud-aws-v3-task.yaml | 4 ++++ .../test-ci-collector-tracing-cloud-azure-task.yaml | 4 ++++ .../test-ci-collector-tracing-cloud-gcp-task.yaml | 4 ++++ .../test-groups/test-ci-collector-tracing-database-task.yaml | 4 ++++ .../test-ci-collector-tracing-frameworks-task.yaml | 4 ++++ .../test-groups/test-ci-collector-tracing-general-task.yaml | 4 ++++ .../test-groups/test-ci-collector-tracing-logger-task.yaml | 4 ++++ .../test-ci-collector-tracing-messaging-task.yaml | 4 ++++ .../test-groups/test-ci-collector-tracing-misc-task.yaml | 4 ++++ .../test-ci-collector-tracing-protocols-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-core-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-metrics-util-task.yaml | 4 ++++ .../test-groups/test-ci-opentelemetry-exporter-task.yaml | 4 ++++ .../test-groups/test-ci-opentelemetry-sampler-task.yaml | 4 ++++ .../tasks/test-groups/test-ci-serverless-collector-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-serverless-task.yaml | 4 ++++ .tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml | 4 ++++ .tekton/templates/test-task.yaml.template | 5 +++++ 25 files changed, 101 insertions(+) diff --git a/.tekton/tasks/test-groups/test-ci-autoprofile-task.yaml b/.tekton/tasks/test-groups/test-ci-autoprofile-task.yaml index 89985c0466..612ef0219e 100644 --- a/.tekton/tasks/test-groups/test-ci-autoprofile-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-autoprofile-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml b/.tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml index 53b9907f25..d724cf78e1 100644 --- a/.tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml b/.tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml index 983a5520c1..6e614fd0f5 100644 --- a/.tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-azure-container-services-task.yaml b/.tekton/tasks/test-groups/test-ci-azure-container-services-task.yaml index 0bb2aaddb0..9add78e3ca 100644 --- a/.tekton/tasks/test-groups/test-ci-azure-container-services-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-azure-container-services-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-general-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-general-task.yaml index 4e0ec1e11d..095d40877d 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-general-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-general-task.yaml @@ -108,6 +108,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v2-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v2-task.yaml index c72cef4f26..ffbb9069d2 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v2-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v2-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v3-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v3-task.yaml index 8b0b99ada2..2174f86830 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v3-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-aws-v3-task.yaml @@ -88,6 +88,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-azure-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-azure-task.yaml index 4a95555a6a..e00e8b7b9d 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-azure-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-azure-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-gcp-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-gcp-task.yaml index 4ba547d3ba..b33a0faa61 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-gcp-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-cloud-gcp-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-database-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-database-task.yaml index 728a28be8e..80788b2311 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-database-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-database-task.yaml @@ -159,6 +159,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-frameworks-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-frameworks-task.yaml index 53265d7853..466df75729 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-frameworks-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-frameworks-task.yaml @@ -104,6 +104,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-general-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-general-task.yaml index 0f738539fc..3825301392 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-general-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-general-task.yaml @@ -104,6 +104,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-logger-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-logger-task.yaml index e2ed08efa7..8a52792728 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-logger-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-logger-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-messaging-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-messaging-task.yaml index 9e8aa95c9c..d1f7853937 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-messaging-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-messaging-task.yaml @@ -173,6 +173,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-misc-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-misc-task.yaml index c5b9f9a1c9..79e4bd52a5 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-misc-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-misc-task.yaml @@ -88,6 +88,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-collector-tracing-protocols-task.yaml b/.tekton/tasks/test-groups/test-ci-collector-tracing-protocols-task.yaml index c1efcd0386..f9ce3a662b 100644 --- a/.tekton/tasks/test-groups/test-ci-collector-tracing-protocols-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-collector-tracing-protocols-task.yaml @@ -94,6 +94,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-core-task.yaml b/.tekton/tasks/test-groups/test-ci-core-task.yaml index 656e7d949d..755bd3bba8 100644 --- a/.tekton/tasks/test-groups/test-ci-core-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-core-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml b/.tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml index 3491decd80..98430a8955 100644 --- a/.tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-metrics-util-task.yaml b/.tekton/tasks/test-groups/test-ci-metrics-util-task.yaml index 29b113fc62..6dce74afb9 100644 --- a/.tekton/tasks/test-groups/test-ci-metrics-util-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-metrics-util-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-opentelemetry-exporter-task.yaml b/.tekton/tasks/test-groups/test-ci-opentelemetry-exporter-task.yaml index 2165d1f678..5505b02782 100644 --- a/.tekton/tasks/test-groups/test-ci-opentelemetry-exporter-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-opentelemetry-exporter-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-opentelemetry-sampler-task.yaml b/.tekton/tasks/test-groups/test-ci-opentelemetry-sampler-task.yaml index a150928e24..e9fbd757b7 100644 --- a/.tekton/tasks/test-groups/test-ci-opentelemetry-sampler-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-opentelemetry-sampler-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-serverless-collector-task.yaml b/.tekton/tasks/test-groups/test-ci-serverless-collector-task.yaml index c7d5543a3d..d13cbf61b2 100644 --- a/.tekton/tasks/test-groups/test-ci-serverless-collector-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-serverless-collector-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-serverless-task.yaml b/.tekton/tasks/test-groups/test-ci-serverless-task.yaml index bff98008e2..7d69c8b821 100644 --- a/.tekton/tasks/test-groups/test-ci-serverless-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-serverless-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml b/.tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml index 888c8a9e38..77a3a903a7 100644 --- a/.tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml +++ b/.tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml @@ -86,6 +86,10 @@ spec: MODIFIED_FILES=$(git diff-tree --no-commit-id --name-only -r $(echo ${CIRCLE_COMPARE_URL} | cut -d/ -f 7)) GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES" diff --git a/.tekton/templates/test-task.yaml.template b/.tekton/templates/test-task.yaml.template index 1e8e09c48d..fbba885aab 100644 --- a/.tekton/templates/test-task.yaml.template +++ b/.tekton/templates/test-task.yaml.template @@ -91,6 +91,11 @@ spec: GIT_COMMIT_DESC=$(git log --format=%B -n 1 $(params.revision)) fi + if ! command -v lerna &> /dev/null; then + echo "Lerna nor found. Installing..." + npm install -g lerna@8.1.8 || exit 1 + fi + echo "BASE_REVISION: $BASE_REVISION" echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL" echo "MODIFIED_FILES: $MODIFIED_FILES"