mirror of https://github.com/citusdata/citus.git
Merge a35702334a
into 55d500de8d
commit
620f8bf6ea
|
@ -2,17 +2,6 @@
|
|||
|
||||
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}
|
||||
|
||||
# Since $HOME is set in GH_Actions as /github/home, pyenv fails to create virtualenvs.
|
||||
|
@ -21,23 +10,11 @@ GITHUB_HOME="${HOME}"
|
|||
export HOME="/root"
|
||||
|
||||
eval "$(pyenv init -)"
|
||||
pyenv versions
|
||||
pyenv virtualenv ${PACKAGING_PYTHON_VERSION} packaging_env
|
||||
pyenv activate packaging_env
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
export PYTHONPATH=/
|
||||
python3 -m tools.packaging_automation.validate_build_output --output_file output.log \
|
||||
--ignore_file .github/packaging/packaging_ignore.yml \
|
||||
--package_type ${package_type}
|
||||
|
|
|
@ -47,6 +47,8 @@ jobs:
|
|||
# For this reason, we need to use a "matrix" to generate names of
|
||||
# rpm images, e.g. citus/packaging:centos-7-pg12
|
||||
packaging_docker_image:
|
||||
- centos-7
|
||||
- oraclelinux-7
|
||||
- oraclelinux-8
|
||||
- almalinux-8
|
||||
- almalinux-9
|
||||
|
@ -54,18 +56,14 @@ jobs:
|
|||
# Postgres removed support for CentOS 7 in PG 16. Below block is needed to
|
||||
# keep the build for CentOS 7 working for PG 14 and PG 15.
|
||||
# Once dependent systems drop support for Centos 7, we can remove this block.
|
||||
include:
|
||||
exclude:
|
||||
- packaging_docker_image: centos-7
|
||||
POSTGRES_VERSION: 14
|
||||
- packaging_docker_image: centos-7
|
||||
POSTGRES_VERSION: 15
|
||||
POSTGRES_VERSION: 16
|
||||
- packaging_docker_image: oraclelinux-7
|
||||
POSTGRES_VERSION: 14
|
||||
- packaging_docker_image: oraclelinux-7
|
||||
POSTGRES_VERSION: 15
|
||||
POSTGRES_VERSION: 16
|
||||
|
||||
container:
|
||||
image: citus/packaging:${{ matrix.packaging_docker_image }}-pg${{ matrix.POSTGRES_VERSION }}
|
||||
image: ghcr.io/citusdata/packaging-test:${{ matrix.packaging_docker_image }}-pg${{ matrix.POSTGRES_VERSION }}
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
|
@ -112,11 +110,6 @@ jobs:
|
|||
PACKAGING_DOCKER_IMAGE: ${{ matrix.packaging_docker_image }}
|
||||
run: |
|
||||
echo "Postgres version: ${POSTGRES_VERSION}"
|
||||
|
||||
## Install required packages to execute packaging tools for rpm based distros
|
||||
yum install python3-pip python3-devel postgresql-devel -y
|
||||
python3 -m pip install wheel
|
||||
|
||||
./.github/packaging/validate_build_output.sh "rpm"
|
||||
|
||||
deb_build_tests:
|
||||
|
@ -142,7 +135,7 @@ jobs:
|
|||
POSTGRES_VERSION: ${{ fromJson(needs.get_postgres_versions_from_file.outputs.pg_versions) }}
|
||||
|
||||
container:
|
||||
image: citus/packaging:${{ matrix.packaging_docker_image }}
|
||||
image: ghcr.io/citusdata/packaging-test:${{ matrix.packaging_docker_image }}
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
|
@ -192,9 +185,4 @@ jobs:
|
|||
PACKAGING_DOCKER_IMAGE: ${{ matrix.packaging_docker_image }}
|
||||
run: |
|
||||
echo "Postgres version: ${POSTGRES_VERSION}"
|
||||
|
||||
apt-get update -y
|
||||
## Install required packages to execute packaging tools for deb based distros
|
||||
apt-get install python3-dev python3-pip -y
|
||||
apt-get purge -y python3-yaml
|
||||
./.github/packaging/validate_build_output.sh "deb"
|
||||
|
|
Loading…
Reference in New Issue