fix(build): fixed circleCI artifacts publish for arm64.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro 2022-06-09 09:34:46 +02:00 committed by poiana
parent a98bf52345
commit 534f66e601

View File

@ -11,38 +11,43 @@ jobs:
- run: - run:
name: Prepare project name: Prepare project
command: | command: |
mkdir -p /tmp/build && mkdir -p /tmp/build/release && \ mkdir -p /tmp/build-arm64 && mkdir -p /tmp/build-arm64/release && \
docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build:/build \ docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build-arm64:/build \
falcosecurity/falco-builder:latest \ falcosecurity/falco-builder:latest \
cmake cmake
- run: - run:
name: Build name: Build
command: | command: |
docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build:/build \ docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build-arm64:/build \
falcosecurity/falco-builder:latest \ falcosecurity/falco-builder:latest \
all all
- run: - run:
name: Run unit tests name: Run unit tests
command: | command: |
docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build:/build \ docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build-arm64:/build \
falcosecurity/falco-builder:latest \ falcosecurity/falco-builder:latest \
tests tests
- run: - run:
name: Build packages name: Build packages
command: | command: |
docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build:/build \ docker run -e BUILD_TYPE="release" -it -v /tmp/source:/source -v /tmp/build-arm64:/build \
falcosecurity/falco-builder:latest \ falcosecurity/falco-builder:latest \
package package
- run: - run:
name: Prepare Artifacts name: Prepare Artifacts
command: | command: |
mkdir -p /tmp/packages mkdir -p /tmp/packages
cp /tmp/build/release/*.deb /tmp/packages cp /tmp/build-arm64/release/*.deb /tmp/packages
cp /tmp/build/release/*.tar.gz /tmp/packages cp /tmp/build-arm64/release/*.tar.gz /tmp/packages
cp /tmp/build/release/*.rpm /tmp/packages cp /tmp/build-arm64/release/*.rpm /tmp/packages
- store_artifacts: - store_artifacts:
path: /tmp/packages path: /tmp/packages
destination: /packages destination: /packages
- persist_to_workspace:
root: /tmp
paths:
- build-arm64/release
- source
# Build a statically linked Falco release binary using musl # Build a statically linked Falco release binary using musl
# This build is 100% static, there are no host dependencies # This build is 100% static, there are no host dependencies
"build-musl": "build-musl":
@ -249,13 +254,13 @@ jobs:
name: Publish rpm-dev name: Publish rpm-dev
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -f /build/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm-dev /source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm-dev
- run: - run:
name: Publish bin-dev name: Publish bin-dev
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz -r bin-dev -a x86_64 /source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz -r bin-dev -a x86_64
/source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-aarch64.tar.gz -r bin-dev -a aarch64 /source/falco/scripts/publish-bin -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.tar.gz -r bin-dev -a aarch64
- run: - run:
name: Publish bin-static-dev name: Publish bin-static-dev
command: | command: |
@ -279,7 +284,7 @@ jobs:
name: Publish deb-dev name: Publish deb-dev
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-x86_64.deb -f /build/release/falco-${FALCO_VERSION}-aarch64.deb -r deb-dev /source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-x86_64.deb -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.deb -r deb-dev
# Publish docker packages # Publish docker packages
"publish-docker-dev": "publish-docker-dev":
@ -365,13 +370,13 @@ jobs:
name: Publish rpm name: Publish rpm
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -f /build/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm /source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-x86_64.rpm -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm
- run: - run:
name: Publish bin name: Publish bin
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz -r bin -a x86_64 /source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-x86_64.tar.gz -r bin -a x86_64
/source/falco/scripts/publish-bin -f /build/release/falco-${FALCO_VERSION}-aarch64.tar.gz -r bin -a aarch64 /source/falco/scripts/publish-bin -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.tar.gz -r bin -a aarch64
- run: - run:
name: Publish bin-static name: Publish bin-static
command: | command: |
@ -395,7 +400,7 @@ jobs:
name: Publish deb name: Publish deb
command: | command: |
FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') FALCO_VERSION=$(cat /build/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
/source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-x86_64.deb -f /build/release/falco-${FALCO_VERSION}-aarch64.deb -r deb /source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-x86_64.deb -f /build-arm64/release/falco-${FALCO_VERSION}-aarch64.deb -r deb
# Publish docker packages # Publish docker packages
"publish-docker": "publish-docker":
docker: docker: