mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-23 00:03:42 +01:00
RHEL build test
This commit is contained in:
parent
c07752372d
commit
c32d8183b8
63
.github/workflows/images_build_rhel.yml
vendored
63
.github/workflows/images_build_rhel.yml
vendored
@ -47,6 +47,7 @@ env:
|
|||||||
PREFLIGHT_IMAGE: "quay.io/opdev/preflight:stable"
|
PREFLIGHT_IMAGE: "quay.io/opdev/preflight:stable"
|
||||||
PFLT_LOGLEVEL: "warn"
|
PFLT_LOGLEVEL: "warn"
|
||||||
PFLT_ARTIFACTS: "/tmp/artifacts"
|
PFLT_ARTIFACTS: "/tmp/artifacts"
|
||||||
|
IMAGE_DIR: "/tmp/images"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
init_build:
|
init_build:
|
||||||
@ -200,28 +201,40 @@ jobs:
|
|||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
env:
|
env:
|
||||||
IMAGE_TAG: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
|
IMAGE_TAG: ${{ steps.build_image.outputs.image-with-tag }}
|
||||||
CACHE_FILE_NAME: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
CACHE_FILE_NAME: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
||||||
IMAGE_FULL: $${{ steps.build_image.outputs.image-with-tag }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "${IMAGE_FULL}"
|
DIGEST=$(podman inspect "${IMAGE_TAG}" --format "{{ index .RepoDigests 0}}" | cut -d '@' -f2)
|
||||||
DIGEST=$(podman inspect ${IMAGE_TAG} --format "{{.Id}}")
|
echo "::group::Image tag"
|
||||||
|
echo "image_tag=$IMAGE_TAG"
|
||||||
|
echo "::endgroup::"
|
||||||
echo "::group::Image digest"
|
echo "::group::Image digest"
|
||||||
echo "$DIGEST"
|
echo "digest=$DIGEST"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
echo "::group::Cache file name"
|
echo "::group::Cache file name"
|
||||||
echo "$CACHE_FILE_NAME"
|
echo "$CACHE_FILE_NAME"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
podman push ${IMAGE_TAG} dir:"/tmp/images/$DIGEST"
|
|
||||||
exit 1
|
echo "$DIGEST" > "${CACHE_FILE_NAME}_digest"
|
||||||
echo "$DIGEST" > "$CACHE_FILE_NAME"
|
echo "$IMAGE_TAG" > "${CACHE_FILE_NAME}_tag"
|
||||||
|
|
||||||
- name: Cache image digest
|
- name: Cache image digest
|
||||||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||||
with:
|
with:
|
||||||
path: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
path: |
|
||||||
|
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_digest
|
||||||
|
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag
|
||||||
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||||
|
|
||||||
|
- name: Store image
|
||||||
|
env:
|
||||||
|
IMAGE_TAG: ${{ steps.build_image.outputs.image-with-tag }}
|
||||||
|
run: |
|
||||||
|
echo "::group::Result"
|
||||||
|
echo "podman push \"${IMAGE_TAG}\" dir:\"$IMAGE_DIR/$DIGEST\""
|
||||||
|
podman push "${IMAGE_TAG}" dir:"$IMAGE_DIR/$DIGEST"
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
build_base_database:
|
build_base_database:
|
||||||
timeout-minutes: 180
|
timeout-minutes: 180
|
||||||
needs: [ "build_base", "init_build"]
|
needs: [ "build_base", "init_build"]
|
||||||
@ -259,31 +272,47 @@ jobs:
|
|||||||
- name: Download SHA256 tag of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
|
- name: Download SHA256 tag of ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }}
|
||||||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||||
with:
|
with:
|
||||||
path: ${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}
|
path: |
|
||||||
|
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_digest
|
||||||
|
${{ env.BASE_BUILD_NAME }}_${{ matrix.arch }}_tag
|
||||||
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
key: ${{ env.BASE_BUILD_NAME }}-${{ matrix.arch }}-${{ github.run_id }}
|
||||||
|
|
||||||
- name: Retrieve ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} SHA256 tag
|
- name: Retrieve ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} info
|
||||||
id: base_build
|
id: base_build
|
||||||
env:
|
env:
|
||||||
MATRIX_ARCH: ${{ matrix.arch }}
|
MATRIX_ARCH: ${{ matrix.arch }}
|
||||||
BASE_IMAGE: ${{ env.BASE_BUILD_NAME }}
|
BASE_IMAGE: ${{ env.BASE_BUILD_NAME }}
|
||||||
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||||
run: |
|
run: |
|
||||||
BASE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}")
|
BASE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_digest")
|
||||||
BUILD_BASE_IMAGE="${IMAGES_PREFIX}${BASE_IMAGE}:${BASE_TAG}"
|
BUILD_BASE_IMAGE="${IMAGES_PREFIX}${BASE_IMAGE}@${BASE_TAG}"
|
||||||
|
|
||||||
echo "::group::Base build image information"
|
echo "::group::Base build image information"
|
||||||
echo "base_tag=${BASE_TAG}"
|
echo "base_tag=${BASE_TAG}"
|
||||||
echo "base_build_image=${BUILD_BASE_IMAGE}"
|
echo "base_build_image=${BUILD_BASE_IMAGE}"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
echo "podman pull \"dir:/tmp/images/${BASE_TAG}\""
|
|
||||||
echo "podman tag ${BASE_TAG} ${BUILD_BASE_IMAGE}"
|
|
||||||
podman pull dir:"/tmp/images/${BASE_TAG}"
|
|
||||||
podman tag ${BASE_TAG} ${BUILD_BASE_IMAGE}
|
|
||||||
|
|
||||||
echo "base_tag=${BASE_TAG}" >> $GITHUB_OUTPUT
|
echo "base_tag=${BASE_TAG}" >> $GITHUB_OUTPUT
|
||||||
echo "base_build_image=${BUILD_BASE_IMAGE}" >> $GITHUB_OUTPUT
|
echo "base_build_image=${BUILD_BASE_IMAGE}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Rull ${{ env.BASE_BUILD_NAME }}:${{ matrix.arch }} image
|
||||||
|
id: base_build
|
||||||
|
env:
|
||||||
|
MATRIX_ARCH: ${{ matrix.arch }}
|
||||||
|
BASE_IMAGE: ${{ env.BASE_BUILD_NAME }}
|
||||||
|
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
|
||||||
|
run: |
|
||||||
|
BASE_DIGEST=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_digest")
|
||||||
|
BASE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_ARCH}_tag")
|
||||||
|
BUILD_BASE_IMAGE="${IMAGES_PREFIX}${BASE_IMAGE}:${BASE_TAG}"
|
||||||
|
|
||||||
|
echo "::group::Pull image"
|
||||||
|
echo "podman pull dir:\"${IMAGE_DIR}/${BUILD_BASE_IMAGE}\""
|
||||||
|
podman pull dir:"${IMAGE_DIR}/${BASE_TAG}"
|
||||||
|
echo "podman tag \"${BASE_TAG}\" \"${BUILD_BASE_IMAGE}\""
|
||||||
|
podman tag "${BASE_TAG}" "${BUILD_BASE_IMAGE}"
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Build Zabbix Build Base
|
- name: Build Zabbix Build Base
|
||||||
id: build_image
|
id: build_image
|
||||||
uses: redhat-actions/buildah-build@b4dc19b4ba891854660ab1f88a097d45aa158f76 # v2.12
|
uses: redhat-actions/buildah-build@b4dc19b4ba891854660ab1f88a097d45aa158f76 # v2.12
|
||||||
|
Loading…
Reference in New Issue
Block a user