Bump Alfresco/alfresco-build-tools from 7.1.0 to 8.7.0 #471
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
paths-ignore: | |
- README.md | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
configure: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix_rpms: ${{ steps.set-matrix.outputs.matrix_rpms }} | |
matrix_debs: ${{ steps.set-matrix.outputs.matrix_debs }} | |
steps: | |
- name: Checkout to repository | |
uses: actions/checkout@v4 | |
- name: Set matrix data | |
id: set-matrix | |
run: | | |
echo "matrix_rpms=$(jq -c . < ./rpms/config.json)" >> $GITHUB_OUTPUT | |
echo "matrix_debs=$(jq -c . < ./debs/config.json)" >> $GITHUB_OUTPUT | |
build_rpms: | |
name: Build ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ${{ matrix.target_arch == 'aarch64' && 'ubuntu-latest-arm64-small' || 'ubuntu-latest' }} | |
needs: | |
- configure | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_rpms) }} | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Prepare image | |
run: docker build . -t buildenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: rpms | |
- name: Build and Install | |
run: docker run --name build buildenv ${{ steps.variables.outputs.imagemagick_version }} ${{ matrix.target_arch }} | |
- name: Retrieve built packages | |
env: | |
IMAGEMAGICK_VERSION: ${{ steps.variables.outputs.imagemagick_version }} | |
run: | | |
docker cp build:/root/rpmbuild/RPMS/ . | |
ls -l RPMS/${{ matrix.target_arch }}/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
path: RPMS/${{ matrix.target_arch }}/*.rpm | |
test_rpms: | |
name: Test ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ${{ matrix.target_arch == 'aarch64' && 'ubuntu-latest-arm64-small' || 'ubuntu-latest' }} | |
needs: | |
- configure | |
- build_rpms | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_rpms) }} | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Download RPMs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
path: rpms/tests/ | |
- name: List RPMs | |
run: ls -R rpms/tests/*.rpm | |
- name: Prepare image | |
run: docker build . -t testenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: rpms/tests/ | |
- name: Install & Test Packages | |
run: docker run --name buildtest testenv ${{ steps.variables.outputs.imagemagick_version }} ${{ matrix.target_arch }} | |
deploy_rpms: | |
name: Deploy ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_rpms | |
- test_rpms | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_rpms) }} | |
fail-fast: false | |
max-parallel: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Download RPMs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-rpm | |
- name: List RPMs | |
run: ls -R *.rpm | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@a809e68fae7ded4c8ad28bb2fd463187cd28bc34 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
group-id: org.imagemagick | |
artifact-id: imagemagick-distribution | |
repository-url: https://nexus.alfresco.com/nexus/content/repositories/thirdparty/ | |
version: ${{ steps.variables.outputs.imagemagick_version }}-ci-${{ steps.variables.outputs.imagemagick_release }} | |
generate-pom: false | |
file: ImageMagick-${{ steps.variables.outputs.imagemagick_version }}.${{ matrix.target_arch }}.rpm | |
classifier: ${{ matrix.nexus_classifier }} | |
files: ImageMagick-libs-${{ steps.variables.outputs.imagemagick_version }}.${{ matrix.target_arch }}.rpm | |
classifiers: libs-${{ matrix.nexus_classifier }} | |
types: rpm | |
maven-username: ${{ secrets.NEXUS_USERNAME }} | |
maven-password: ${{ secrets.NEXUS_PASSWORD }} | |
build_deb: | |
name: Build ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ${{ matrix.target_arch == 'aarch64' && 'ubuntu-latest-arm64-small' || 'ubuntu-latest' }} | |
needs: | |
- configure | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Prepare image | |
run: docker build . -t buildenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: debs | |
- name: Build and Install | |
run: docker run --name build buildenv ${{ steps.variables.outputs.imagemagick_version }} ${{ matrix.target_arch }} | |
- name: Retrieve built packages | |
env: | |
IMAGEMAGICK_VERSION: ${{ steps.variables.outputs.imagemagick_version }} | |
PKG_ARCH: ${{ matrix.target_arch == 'aarch64' && 'arm64' || 'amd64' }} | |
run: | | |
docker cp build:/build/imagemagick-alfresco_${IMAGEMAGICK_VERSION}_${PKG_ARCH}.deb . | |
docker cp build:/build/imagemagick-alfresco-dev_${IMAGEMAGICK_VERSION}_${PKG_ARCH}.deb . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-deb | |
path: "*.deb" | |
test_deb: | |
name: Test ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ${{ matrix.target_arch == 'aarch64' && 'ubuntu-latest-arm64-small' || 'ubuntu-latest' }} | |
needs: | |
- configure | |
- build_deb | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
fail-fast: false | |
env: | |
PKG_ARCH: ${{ matrix.target_arch == 'aarch64' && 'arm64' || 'amd64' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Download DEBs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-deb | |
path: debs/tests/ | |
- name: List Debs | |
run: ls -R debs/tests/*.deb | |
- name: Prepare test image | |
run: docker build . -t testenv --build-arg BASE_IMAGE=${{ matrix.base_image }} | |
working-directory: debs/tests/ | |
- name: Install & Test Packages | |
run: docker run --name buildtest testenv ${{ steps.variables.outputs.imagemagick_version }} ${{ env.PKG_ARCH }} | |
deploy_deb: | |
name: Deploy ${{ matrix.base_image }} ${{ matrix.target_arch }} | |
runs-on: ubuntu-latest | |
needs: | |
- configure | |
- build_deb | |
- test_deb | |
strategy: | |
matrix: ${{ fromJson(needs.configure.outputs.matrix_debs) }} | |
fail-fast: false | |
max-parallel: 1 | |
env: | |
PKG_ARCH: ${{ matrix.target_arch == 'aarch64' && 'arm64' || 'amd64' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set build variables | |
id: variables | |
run: | | |
echo "imagemagick_version=$(cat ./imagemagick-version)" >> $GITHUB_OUTPUT | |
echo "imagemagick_release=$(cat ./release-version)" >> $GITHUB_OUTPUT | |
- name: Download DEBs | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.nexus_classifier }}-deb | |
- name: List Debs | |
run: ls -R *.deb | |
- name: Deploy to nexus | |
uses: Alfresco/alfresco-build-tools/.github/actions/maven-deploy-file@a809e68fae7ded4c8ad28bb2fd463187cd28bc34 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
group-id: org.imagemagick | |
artifact-id: imagemagick-distribution | |
repository-url: https://nexus.alfresco.com/nexus/content/repositories/thirdparty/ | |
version: ${{ steps.variables.outputs.imagemagick_version }}-ci-${{ steps.variables.outputs.imagemagick_release }} | |
generate-pom: false | |
file: imagemagick-alfresco_${{ steps.variables.outputs.imagemagick_version }}_${{ env.PKG_ARCH }}.deb | |
classifier: ${{ matrix.nexus_classifier }} | |
files: imagemagick-alfresco-dev_${{ steps.variables.outputs.imagemagick_version }}_${{ env.PKG_ARCH }}.deb | |
classifiers: ${{ matrix.nexus_classifier }}-dev | |
types: deb | |
maven-username: ${{ secrets.NEXUS_USERNAME }} | |
maven-password: ${{ secrets.NEXUS_PASSWORD }} |