Skip to content

Commit

Permalink
Add comments for set_config
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-dudko committed Sep 21, 2023
1 parent 87e9ad6 commit 7c83027
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.8'
# This code block prepares configuration data for a task.
- name: Prepare config
id: set_config
shell: bash
run: |
# Capture the current date and time in a specific format
CURDATE=$(date '+%m%d%H%M%S' --utc)
# Reads the configurations file and exclude lines starting with # and then remove line breaks
CURCONFIG=$(grep -v "^#.*" ./.github/workflows/performance-tests-job-configs/config_PerformanceTests_BiqQueryIO_Read_Python.txt | tr '\n' ' ')
# Appends the value of CURDATE to the original configuration
CONFIGWITHDATE=$(echo "${CURCONFIG/bqio_read_python_/bqio_read_python_$CURDATE}")
# Assigns $CONFIGWITHDATE to a variable named prepared_config
echo "prepared_config=$CONFIGWITHDATE" >> $GITHUB_OUTPUT
- name: run BigQueryIO Read Python Performance Test
uses: ./.github/actions/gradle-command-self-hosted-action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,18 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.8'
# This code block prepares configuration data for a task.
- name: Prepare config
id: set_config
shell: bash
run: |
# capture the current date and time in a specific format
CURDATE=$(date '+%m%d%H%M%S' --utc)
# reads the configurations file and exclude lines starting with # and then remove line breaks
CURCONFIG=$(grep -v "^#.*" ./.github/workflows/performance-tests-job-configs/config_PerformanceTests_BiqQueryIO_Write_Python.txt | tr '\n' ' ')
# appends the value of CURDATE to the original configuration
CONFIGWITHDATE=$(echo "${CURCONFIG/bqio_write_python_/bqio_write_python_$CURDATE}")
# assigns $CONFIGWITHDATE to a variable named prepared_config
echo "prepared_config=$CONFIGWITHDATE" >> $GITHUB_OUTPUT
- name: run BigQueryIO Write Batch Python Performance Test
uses: ./.github/actions/gradle-command-self-hosted-action
Expand Down

0 comments on commit 7c83027

Please sign in to comment.