Set to use default TARGETARCH in build
This commit is contained in:
parent
314b748a97
commit
b7fc9d2911
21
.github/workflows/4testing-build.yml
vendored
21
.github/workflows/4testing-build.yml
vendored
|
@ -44,13 +44,13 @@ jobs:
|
||||||
|
|
||||||
- name: Build 4testing
|
- name: Build 4testing
|
||||||
run: |
|
run: |
|
||||||
### ➡ At this step build variable declaration ###
|
### ==>> At this step build variable declaration ###
|
||||||
DOCKER_TAG=$( echo ${{ env.RELEASE_VERSION }} | sed 's/^.//' )
|
DOCKER_TAG=$( echo ${{ env.RELEASE_VERSION }} | sed 's/^.//' )
|
||||||
PACKAGE_VERSION=$( echo $DOCKER_TAG | sed -E 's/(.*)\./\1-/' )
|
PACKAGE_VERSION=$( echo $DOCKER_TAG | sed -E 's/(.*)\./\1-/' )
|
||||||
NODE_PLATFORMS=$( echo ${{ steps.buildx.outputs.platforms }} | sed 's/linux\///g' | sed 's/,/ /g' )
|
NODE_PLATFORMS=$( echo ${{ steps.buildx.outputs.platforms }} | sed 's/linux\///g' | sed 's/,/ /g' )
|
||||||
echo "Start check avalivable build platforms >>"
|
echo "Start check avalivable build platforms >>"
|
||||||
|
|
||||||
### ➡ In this loop we will check all avalivable documentserver architectures. After that all accessed arch will be added to build-platforms list. ###
|
### ==>> In this loop we will check all avalivable documentserver architectures. After that all accessed arch will be added to build-platforms list. ###
|
||||||
for ARCH in ${NODE_PLATFORMS}; do
|
for ARCH in ${NODE_PLATFORMS}; do
|
||||||
REPO_URL=${{ secrets.REPO_URL }}
|
REPO_URL=${{ secrets.REPO_URL }}
|
||||||
if [[ ${{ env.RELEASE_VERSION }} == v99.* ]]; then
|
if [[ ${{ env.RELEASE_VERSION }} == v99.* ]]; then
|
||||||
|
@ -68,28 +68,15 @@ jobs:
|
||||||
done
|
done
|
||||||
PACKAGE_URL_BUILD=$( echo ${PACKAGE_URL_CHECK} | sed -e "s/${PACKAGE_VERSION}_.*.deb/${PACKAGE_VERSION}_TARGETARCH.deb/g" )
|
PACKAGE_URL_BUILD=$( echo ${PACKAGE_URL_CHECK} | sed -e "s/${PACKAGE_VERSION}_.*.deb/${PACKAGE_VERSION}_TARGETARCH.deb/g" )
|
||||||
|
|
||||||
### ➡ At this step if there is no access to any platform and platform list is empty, build will exit with 1. ###
|
### ==>> At this step if there is no access to any platform and platform list is empty, build will exit with 1. ###
|
||||||
if [[ -z ${BUILD_PLATFORMS} ]]; then
|
if [[ -z ${BUILD_PLATFORMS} ]]; then
|
||||||
echo "Have no access to any platform >> exit with 1"
|
echo "Have no access to any platform >> exit with 1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "DONE: Check passed >> Build for platforms: ${BUILD_PLATFORMS}"
|
echo "DONE: Check passed >> Build for platforms: ${BUILD_PLATFORMS}"
|
||||||
|
|
||||||
### ➡ Preconfiguration for debugging with --print key ###
|
|
||||||
PRODUCT_EDITION=${{ matrix.edition }} \
|
|
||||||
PACKAGE_URL=$PACKAGE_URL_BUILD \
|
|
||||||
PRODUCT_NAME=${{ env.PRODUCT_NAME }} \
|
|
||||||
DOCKERFILE=Dockerfile \
|
|
||||||
PREFIX_NAME=4testing- \
|
|
||||||
TAG=$DOCKER_TAG \
|
|
||||||
PLATFORM=$BUILD_PLATFORMS \
|
|
||||||
COMPANY_NAME=${{ env.COMPANY_NAME }} \
|
|
||||||
docker buildx bake \
|
|
||||||
-f docker-bake.hcl ${{ matrix.images }} \
|
|
||||||
--print
|
|
||||||
echo "Build is starting ... >>"
|
echo "Build is starting ... >>"
|
||||||
|
|
||||||
### ➡ Build and push images at this step ###
|
### ==>> Build and push images at this step ###
|
||||||
PRODUCT_EDITION=${{ matrix.edition }} \
|
PRODUCT_EDITION=${{ matrix.edition }} \
|
||||||
PACKAGE_URL=$PACKAGE_URL_BUILD \
|
PACKAGE_URL=$PACKAGE_URL_BUILD \
|
||||||
PRODUCT_NAME=${{ env.PRODUCT_NAME }} \
|
PRODUCT_NAME=${{ env.PRODUCT_NAME }} \
|
||||||
|
|
|
@ -81,10 +81,7 @@ ENV COMPANY_NAME=$COMPANY_NAME \
|
||||||
PRODUCT_NAME=$PRODUCT_NAME \
|
PRODUCT_NAME=$PRODUCT_NAME \
|
||||||
PRODUCT_EDITION=$PRODUCT_EDITION
|
PRODUCT_EDITION=$PRODUCT_EDITION
|
||||||
|
|
||||||
RUN ARCH=$(uname -m)
|
RUN PACKAGE_URL=$( echo ${PACKAGE_URL} | sed "s/TARGETARCH/"${TARGETARCH}"/g") && \
|
||||||
if [ "${ARCH}" = "x86_64" ]; then ARCH=amd64; fi && \
|
|
||||||
if [ "${ARCH}" = "aarch64" ]; then ARCH=arm64; fi && \
|
|
||||||
PACKAGE_URL=$( echo ${PACKAGE_URL} | sed "s/TARGETARCH/"${ARCH}"/g") && \
|
|
||||||
wget -q -P /tmp "$PACKAGE_URL" && \
|
wget -q -P /tmp "$PACKAGE_URL" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
service postgresql start && \
|
service postgresql start && \
|
||||||
|
|
Loading…
Reference in a new issue