Skip to content

ci: improved credentials in tekton containers - #2707

Draft
kirrg001 wants to merge 2 commits into
mainfrom
test-creds
Draft

ci: improved credentials in tekton containers#2707
kirrg001 wants to merge 2 commits into
mainfrom
test-creds

Conversation

@kirrg001

Copy link
Copy Markdown
Contributor

export $CRED=$(ibmcloud sm secret-value-get --name "$CRED" --service-name "$SM_SERVICE_NAME" --output json | jq -r '.resources[0].secret_data.payload')
done
fi
unset API_KEY

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the most important thing.

Comment thread .tekton/tasks/test-groups/aws-lambda-split-5-task.yaml
Comment thread .tekton/tasks/test-groups/collector-1-redis-task.yaml

@aryamohanan aryamohanan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The idea looks cool. Let’s try it out.

exit 0
fi
fi
if [ "false" == "true" ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the non-collector tests, including serverless, AWS Lambda, etc., the logic for cleaning up API_KEY is currently inside dead code that never executes:

if [ "false" == "true" ]; then

We can simply unset API_KEY just after the offline cache fetch step.

Also, this logic is not required in these files and can be removed, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm... since this is template-generated, we can maybe use the end of this block to unset API_KEY, so that it will be applied to all tasks irrespective of the SM fetch step 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants