|
@@ -30,6 +30,8 @@ jobs:
|
|
|
- {distro: debian, version: "9", pkgclouddistro: debian/stretch, format: deb, base_image: debian, platform: linux/i386, arch: i386}
|
|
|
- {distro: debian, version: "10", pkgclouddistro: debian/buster, format: deb, base_image: debian, platform: linux/amd64, arch: amd64}
|
|
|
- {distro: debian, version: "10", pkgclouddistro: debian/buster, format: deb, base_image: debian, platform: linux/i386, arch: i386}
|
|
|
+ - {distro: debian, version: "11", pkgclouddistro: debian/bullseye, format: deb, base_image: debian, platform: linux/amd64, arch: amd64, alias: bullseye}
|
|
|
+ - {distro: debian, version: "11", pkgclouddistro: debian/bullseye, format: deb, base_image: debian, platform: linux/i386, arch: i386, alias: bullseye}
|
|
|
- {distro: ubuntu, version: "16.04", pkgclouddistro: ubuntu/xenial, format: deb, base_image: ubuntu, platform: linux/amd64, arch: amd64}
|
|
|
- {distro: ubuntu, version: "16.04", pkgclouddistro: ubuntu/xenial, format: deb, base_image: ubuntu, platform: linux/i386, arch: i386}
|
|
|
- {distro: ubuntu, version: "18.04", pkgclouddistro: ubuntu/bionic, format: deb, base_image: ubuntu, platform: linux/amd64, arch: amd64}
|
|
@@ -53,14 +55,14 @@ jobs:
|
|
|
uses: actions/checkout@v2
|
|
|
with:
|
|
|
fetch-depth: 0 # We need full history for versioning
|
|
|
- submodules: true
|
|
|
+ submodules: recursive
|
|
|
- name: Checkout Tag # Otherwise check out the tag that triggered this.
|
|
|
if: github.event_name == 'workflow_dispatch'
|
|
|
uses: actions/checkout@v2
|
|
|
with:
|
|
|
ref: ${{ github.event.ref }}
|
|
|
fetch-depth: 0 # We need full history for versioning
|
|
|
- submodules: true
|
|
|
+ submodules: recursive
|
|
|
- name: Check Base Branch
|
|
|
run: |
|
|
|
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
|
@@ -89,32 +91,27 @@ jobs:
|
|
|
- name: Setup QEMU
|
|
|
if: matrix.platform != 'linux/amd64'
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
- - name: Setup Buildx
|
|
|
- uses: docker/setup-buildx-action@v1
|
|
|
- name: Prepare Docker Environment
|
|
|
shell: bash
|
|
|
run: |
|
|
|
echo '{"cgroup-parent": "/actions_job", "experimental": true}' | sudo tee /etc/docker/daemon.json 2>/dev/null
|
|
|
sudo service docker restart
|
|
|
+ - name: Set Base Image Version
|
|
|
+ shell: bash
|
|
|
+ run: |
|
|
|
+ if [ -z "${{ matrix.alias }}" ] ; then
|
|
|
+ echo "version=${{ matrix.version }}" >> $GITHUB_ENV
|
|
|
+ else
|
|
|
+ echo "version=${{ matrix.alias }}" >> $GITHUB_ENV
|
|
|
+ fi
|
|
|
- name: Build Packages
|
|
|
- uses: docker/build-push-action@v2
|
|
|
- with:
|
|
|
- platforms: ${{ matrix.platform }}
|
|
|
- file: packaging/Dockerfile.packager
|
|
|
- tags: local/package-builder:${{ matrix.distro}}${{ matrix.version }}
|
|
|
- push: false
|
|
|
- load: true
|
|
|
- build-args: |
|
|
|
- ARCH=${{ matrix.arch }}
|
|
|
- DISTRO=${{ matrix.distro }}
|
|
|
- TEST_BASE=${{ matrix.base_image }}
|
|
|
- DISTRO_VERSION=${{ matrix.version }}
|
|
|
- PKG_VERSION=${{ env.pkg_version }}
|
|
|
- - name: Extract Packages
|
|
|
shell: bash
|
|
|
run: |
|
|
|
- mkdir -p artifacts
|
|
|
- docker run -e DO_NOT_TRACK=1 --platform ${{ matrix.platform }} -v $PWD/artifacts:/artifacts local/package-builder:${{ matrix.distro }}${{ matrix.version }}
|
|
|
+ docker run -e DO_NOT_TRACK=1 -e VERSION=${{ env.pkg_version }} --platform=${{ matrix.platform }} -v $PWD:/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
|
|
|
+ - name: Test Packages
|
|
|
+ shell: bash
|
|
|
+ run: |
|
|
|
+ docker run -e DO_NOT_TRACK=1 -e DISTRO=${{ matrix.distro }} -e VERSION=${{ env.pkg_version }} -e DISTRO_VERSION=${{ env.version }} --platform=${{ matrix.platform }} -v $PWD:/netdata ${{ matrix.base_image }}:${{ env.version }} /netdata/.github/scripts/pkg-test.sh
|
|
|
- name: Upload
|
|
|
if: github.event_name == 'workflow_dispatch'
|
|
|
shell: bash
|