Skip to content

Commit

Permalink
ci: fix learna not found issue by forcefully installing lerna if not …
Browse files Browse the repository at this point in the history
…found
  • Loading branch information
abhilash-sivan committed Oct 28, 2024
1 parent 2f369c4 commit a83ea78
Show file tree
Hide file tree
Showing 25 changed files with 101 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-autoprofile-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-aws-fargate-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-aws-lambda-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-collector-general-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-core-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-google-cloud-run-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-metrics-util-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-serverless-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
4 changes: 4 additions & 0 deletions .tekton/tasks/test-groups/test-ci-shared-metrics-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi
echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down
5 changes: 5 additions & 0 deletions .tekton/templates/test-task.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] || exit 1
fi

echo "BASE_REVISION: $BASE_REVISION"
echo "CIRCLE_COMPARE_URL: $CIRCLE_COMPARE_URL"
echo "MODIFIED_FILES: $MODIFIED_FILES"
Expand Down

0 comments on commit a83ea78

Please sign in to comment.