Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix learna not found issue by forcefully installing lerna in tasks #1419

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a check for lerna and if not installed, then installing it globally

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