Skip to content
Open
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
3 changes: 0 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export GO_VERSION
REPO_NAME=$(repo_name "${BUILDKITE_REPO}")
export REPO_NAME

export TMP_FOLDER_TEMPLATE_BASE="tmp.${REPO_NAME}"
export TMP_FOLDER_TEMPLATE="${TMP_FOLDER_TEMPLATE_BASE}.XXXXXXXXX"
Comment on lines -28 to -29
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These were used in the past to create temporal folders to store the google_credentials.json file. But this was migrated in favor of using GCP OIDC (#13856)

https://github.com/elastic/integrations/pull/13856/files#diff-68c0021e761ebe6b8a42d32dfdf3dda2200f0f2fee50106c85c9aea530ccf3c3L261-L262


REPO_BUILD_TAG="${REPO_NAME}/$(buildkite_pr_branch_build_id)"
export REPO_BUILD_TAG

Expand Down
1 change: 0 additions & 1 deletion .buildkite/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ fi

echo "--- Cleaning up"
unset_secrets
cleanup

exit "${exit_code}"
6 changes: 0 additions & 6 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ retry() {
return 0
}

cleanup() {
echo "Deleting temporary files..."
rm -rf ${WORKSPACE}/${TMP_FOLDER_TEMPLATE_BASE}.*
echo "Done."
}

Comment on lines -48 to -53
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently, there is no folder created with mktemp with those variables as a template.
So I think this cleanup function can be deleted.

unset_secrets () {
for var in $(printenv | sed 's;=.*;;' | sort); do
if [[ "$var" == *_SECRET || "$var" == *_TOKEN ]]; then
Expand Down