-
Notifications
You must be signed in to change notification settings - Fork 11
100 lines (90 loc) · 3.15 KB
/
build-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build Package
env:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
PACKAGING_SECRET_KEY: "${{ secrets.PACKAGING_SECRET_KEY }}"
PACKAGE_ENCRYPTION_KEY: "${{ secrets.PACKAGE_ENCRYPTION_KEY }}"
PACKAGING_PASSPHRASE: "${{ secrets.PACKAGING_PASSPHRASE }}"
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_PASSWORD }}"
DOCKERHUB_USER_NAME: "${{ secrets.DOCKERHUB_USER_NAME }}"
ACR_PASSWORD: "${{ secrets.ACR_PASSWORD }}"
ACR_SERVICE_PRINCIPAL_ID: "${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}"
CURRENT_BRANCH: "${GITHUB_REF##*/}"
TEST: false
on:
push:
branches: "**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_docker_files_integrity:
name: Check if docker files are compliant with templates
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Update and check dockerfiles
run: |
./update_dockerfiles
git add --intent-to-add dockerfiles
git diff --exit-code dockerfiles
build_package:
name: Build package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
TARGET_PLATFORM:
- centos,7
- oraclelinux,8
- oraclelinux,7
- almalinux,8
- almalinux,9
POSTGRES_VERSION:
- 11
- 12
- 13
- 14
- 15
- 16
include:
- TARGET_PLATFORM: debian,buster
- TARGET_PLATFORM: debian,bullseye
- TARGET_PLATFORM: debian,bookworm
# removing temporarily since postgres 16 packages does not exist for ubuntu bionic
# - TARGET_PLATFORM: ubuntu,bionic
- TARGET_PLATFORM: ubuntu,focal
- TARGET_PLATFORM: ubuntu,jammy
- TARGET_PLATFORM: ubuntu,kinetic
- TARGET_PLATFORM: pgxn
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install package dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
- name: Install wheel for el/8
if: matrix.TARGET_PLATFORM == 'centos,8'
run: python -m pip install wheel
- name: Build image for the target platform
run: |
git checkout -- dockerfiles
./update_image
env:
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}
- name: Clone tools repo for test
run: git clone -b v0.8.27 --depth=1 https://github.com/citusdata/tools.git tools
- name: Execute packaging tests
run: |
python -m pip install -r tools/packaging_automation/requirements.txt
python -m pytest -q tools/packaging_automation/tests/test_citus_package.py -k 'test_build_packages'
env:
PACKAGING_IMAGE_PLATFORM: "${{matrix.TARGET_PLATFORM}}"
- name: Push images
run: |
export CURRENT_BRANCH=${GITHUB_REF##*/}
./ci/push_images
env:
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
POSTGRES_VERSION: ${{ matrix.POSTGRES_VERSION }}