mirror of https://github.com/citusdata/citus.git
Fixes error surpressions in packaging pipelines (#7054)
DESCRIPTION: PR description that will go into the change log, up to 78 characters There are 4 errors arised recently and I fixed them in this PR. Problems and fixes are as below: 1. When executing make step in packaging pipeline, if it gets error, we can not detect it since there are additional operations after make in one line. With this fix, now if an error occured after make execution, we can detect and see the step red and failed here, 2. Recently we started to get the error ` fatal: detected dubious ownership in repository at '/__w/citus/citus' ` as below https://github.com/citusdata/citus/actions/runs/5542692968/jobs/10117706723#step:7:9 There is a fix for that one as well. 3. fixed the requirements issue arised related to urllib3 library version 4. Getting errors with centos-8 docker image with the new postgres-dev packages. Now, changed centos-8 image with almalinux-8 and now it workspull/7075/head
parent
da7dd1cc54
commit
3f0e1efb5a
|
@ -1,3 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# Function to get the OS version
|
||||||
|
get_rpm_os_version() {
|
||||||
|
if [[ -f /etc/centos-release ]]; then
|
||||||
|
cat /etc/centos-release | awk '{print $4}'
|
||||||
|
elif [[ -f /etc/oracle-release ]]; then
|
||||||
|
cat /etc/oracle-release | awk '{print $5}'
|
||||||
|
else
|
||||||
|
echo "Unknown"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
package_type=${1}
|
package_type=${1}
|
||||||
|
|
||||||
# Since $HOME is set in GH_Actions as /github/home, pyenv fails to create virtualenvs.
|
# Since $HOME is set in GH_Actions as /github/home, pyenv fails to create virtualenvs.
|
||||||
|
@ -10,11 +25,24 @@ pyenv versions
|
||||||
pyenv virtualenv ${PACKAGING_PYTHON_VERSION} packaging_env
|
pyenv virtualenv ${PACKAGING_PYTHON_VERSION} packaging_env
|
||||||
pyenv activate packaging_env
|
pyenv activate packaging_env
|
||||||
|
|
||||||
git clone -b v0.8.24 --depth=1 https://github.com/citusdata/tools.git tools
|
git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools
|
||||||
python3 -m pip install -r tools/packaging_automation/requirements.txt
|
python3 -m pip install -r tools/packaging_automation/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
echo "Package type: ${package_type}"
|
||||||
|
echo "OS version: $(get_rpm_os_version)"
|
||||||
|
|
||||||
|
# if os version is centos 7 or oracle linux 7, then remove urllib3 with pip uninstall and install urllib3<2.0.0 with pip install
|
||||||
|
if [[ ${package_type} == "rpm" && $(get_rpm_os_version) == 7* ]]; then
|
||||||
|
python3 -m pip uninstall -y urllib3
|
||||||
|
python3 -m pip install 'urllib3<2'
|
||||||
|
fi
|
||||||
|
|
||||||
python3 -m tools.packaging_automation.validate_build_output --output_file output.log \
|
python3 -m tools.packaging_automation.validate_build_output --output_file output.log \
|
||||||
--ignore_file .github/packaging/packaging_ignore.yml \
|
--ignore_file .github/packaging/packaging_ignore.yml \
|
||||||
--package_type ${package_type}
|
--package_type ${package_type}
|
||||||
pyenv deactivate
|
pyenv deactivate
|
||||||
# Set $HOME back to /github/home
|
# Set $HOME back to /github/home
|
||||||
export HOME=${GITHUB_HOME}
|
export HOME=${GITHUB_HOME}
|
||||||
|
|
||||||
|
# Print the output to the console
|
||||||
|
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
- oraclelinux-7
|
- oraclelinux-7
|
||||||
- oraclelinux-8
|
- oraclelinux-8
|
||||||
- centos-7
|
- centos-7
|
||||||
- centos-8
|
- almalinux-8
|
||||||
- almalinux-9
|
- almalinux-9
|
||||||
POSTGRES_VERSION: ${{ fromJson(needs.get_postgres_versions_from_file.outputs.pg_versions) }}
|
POSTGRES_VERSION: ${{ fromJson(needs.get_postgres_versions_from_file.outputs.pg_versions) }}
|
||||||
|
|
||||||
|
@ -73,8 +73,18 @@ jobs:
|
||||||
|
|
||||||
- name: Make
|
- name: Make
|
||||||
run: |
|
run: |
|
||||||
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||||
make CFLAGS="-Wno-missing-braces" -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log
|
make CFLAGS="-Wno-missing-braces" -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log
|
||||||
|
|
||||||
|
# Check the exit code of the make command
|
||||||
|
make_exit_code=${PIPESTATUS[0]}
|
||||||
|
|
||||||
|
# If the make command returned a non-zero exit code, exit with the same code
|
||||||
|
if [[ $make_exit_code -ne 0 ]]; then
|
||||||
|
echo "make command failed with exit code $make_exit_code"
|
||||||
|
exit $make_exit_code
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Make install
|
- name: Make install
|
||||||
run: |
|
run: |
|
||||||
make CFLAGS="-Wno-missing-braces" install 2>&1 | tee -a output.log
|
make CFLAGS="-Wno-missing-braces" install 2>&1 | tee -a output.log
|
||||||
|
@ -141,9 +151,22 @@ jobs:
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
- name: Make
|
- name: Make
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||||
make -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log
|
make -sj$(cat /proc/cpuinfo | grep "core id" | wc -l) 2>&1 | tee -a output.log
|
||||||
|
|
||||||
|
# Check the exit code of the make command
|
||||||
|
make_exit_code=${PIPESTATUS[0]}
|
||||||
|
|
||||||
|
# If the make command returned a non-zero exit code, exit with the same code
|
||||||
|
if [[ $make_exit_code -ne 0 ]]; then
|
||||||
|
echo "make command failed with exit code $make_exit_code"
|
||||||
|
exit $make_exit_code
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Make install
|
- name: Make install
|
||||||
run: |
|
run: |
|
||||||
make install 2>&1 | tee -a output.log
|
make install 2>&1 | tee -a output.log
|
||||||
|
|
Loading…
Reference in New Issue