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

Adjust generation of env file that starts with BUILDKITE word #411

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

RafalKorepta
Copy link
Contributor

The following 2 environment variables was added to each buildkite job

BASH_FUNC___buildkite_clean_unused_paths%%=() {  REDPANDA_BUILD_CHECKOUT_PATH=$(dirname "$BUILDKITE_BUILD_CHECKOUT_PATH");
 cd $REDPANDA_BUILD_CHECKOUT_PATH;
 for i in $(ls -1 . | grep -v "^${BUILDKITE_PIPELINE_NAME}\$");
 do
 echo "Cleaning $i";
 rm -rf ./$i;
 done;
 cd -
}
BASH_FUNC___buildkite_chown_checkout_path%%=() {  user_id=$UID;
 group_id=$(id -g);
 REDPANDA_BUILD_CHECKOUT_PATH=$(dirname "$BUILDKITE_BUILD_CHECKOUT_PATH");
 echo "Changing ownership of $REDPANDA_BUILD_CHECKOUT_PATH to '${user_id}:${group_id}'";
 docker run --rm --privileged --userns=host -t -v "$REDPANDA_BUILD_CHECKOUT_PATH":"$REDPANDA_BUILD_CHECKOUT_PATH" --workdir="$REDPANDA_BUILD_CHECKOUT_PATH" public.ecr.aws/docker/library/alpine:3 chown -R ${user_id}:${group_id} $REDPANDA_BUILD_CHECKOUT_PATH
}

As grep was looking for any BUILDKITE word 3 lines from the above functions was added to env-file-for-buildkite which was passed to docker run command.

ci/scripts/run-in-nix-docker.sh Outdated Show resolved Hide resolved
@RafalKorepta
Copy link
Contributor Author

I made mistake by merging #410

This PR will adjust the grep now.

@RafalKorepta RafalKorepta changed the title Fix generation of env file that has only BUILDKITE variables Adjust generation of env file that starts with BUILDKITE word Jan 23, 2025
@RafalKorepta RafalKorepta merged commit 2cfb979 into main Jan 23, 2025
7 of 8 checks passed
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.

2 participants