Skip to content

[Backport 7.x] Update code gen task to not rely on User in Dockerfile #5472

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

Merged
merged 1 commit into from
Mar 24, 2021
Merged
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
10 changes: 5 additions & 5 deletions .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ TASK=$1
TASK_ARGS=()
VERSION=$2
STACK_VERSION=$VERSION
REPO_BINDING="$repo:/sln"
set -euo pipefail

output_folder=".ci/output"
OUTPUT_DIR="$repo/${output_folder}"
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
mkdir -p "$OUTPUT_DIR"

DOTNET_VERSION=${DOTNET_VERSION-5.0.103}
Expand Down Expand Up @@ -49,19 +49,19 @@ case $CMD in
TASK=codegen
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION")
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
REPO_BINDING="$repo:/sln"
;;
*)
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
exit 1
esac

#--volume "${OUTPUT_DIR}:/sln/${output_folder}"

# -u does not work need to be root inside the container, the chown hack at the end ensures
# we still own any new files at the end of this run
docker run \
--env "DOTNET_VERSION" \
--name test-runner \
--volume $REPO_BINDING \
--rm \
elastic/elasticsearch-net \
./build.sh $TASK "${TASK_ARGS[@]}"
/bin/bash -c "./build.sh $TASK ${TASK_ARGS[@]} && chown -R $(id -u):$(id -g) ."
1 change: 1 addition & 0 deletions .github/workflows/make-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "fix/${{ matrix.branch }}/code-gen"
base: "${{ matrix.branch }}"
delete-branch: true
commit-message: "[codegen] ${{ matrix.branch }} synchronization"
title: '[codegen] ${{ matrix.branch }} synchronization'
body: |
Expand Down