diff --git a/.circleci/config.yml b/.circleci/config.yml index 281e7da58a8..a672f0a9a26 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,23 +1,28 @@ version: 2.1 jobs: - "build-on-arm64": + "build-arm64": machine: enabled: true image: ubuntu-2004:202101-01 - resource-class: arm.medium + resource_class: arm.medium steps: - run: - - command: | + command: | docker run -e BUILD_TYPE="release" -it falcosecturity/falco-builder:latest /bin/sh -c "cd source/falco && \ ./usr/bin/entrypoint cmake && \ ./usr/bin/entrypoint all && \ ./usr/bin/entrypoint tests && \ - ./usr/bin/entrypoint package && \ - cd ../.. && \ - mkdir -p /temp/packages && \ - cp /build/release/*.deb /temp/packages && \ - cp /build/release/*/tar.gz /temp/packages && \ - cp /build/release/*.rpm /temp/packages" + ./usr/bin/entrypoint package" + - run: + name: Prepare Artifacts + command: | + mkdir -p /tmp/packages + docker cp falcosecurity/falco-builder:/build/release/*.deb /tmp/packages + docker cp falcosecurity/falco-builder:/build/release/*.tar.gz /tmp/packages + docker cp falcosecurity/falco-builder:/build/release/*.rpm /tmp/packages + - store_artifacts: + path: /tmp/packages + destination: /packages # Build a statically linked Falco release binary using musl # This build is 100% static, there are no host dependencies @@ -376,11 +381,13 @@ jobs: command: | 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 -r rpm-dev + /source/falco/scripts/publish-rpm -f /build/release/falco-${FALCO_VERSION}-aarch64.rpm -r rpm-dev - run: name: Publish bin-dev command: | 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}-aarch64.tar.gz -r bin-dev -a aarch64 - run: name: Publish bin-static-dev command: | @@ -405,44 +412,7 @@ jobs: command: | 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 -r deb-dev - - "publish/packages-dev-arm64": - machine: - enabled: true - image: ubuntu-2004:202101-01 - resource-class: arm.medium - steps: - - run: - name: Setup - command: | - docker run -it docker.io/centos:7 /bin/sh -c "yum install epel-release -y && \ - yum update -y && \ - yum install createrepo gpg python python-pip -y && \ - pip install awscli==1.19.47 && \ - echo $GPG_KEY | base64 -d | gpg --import && \ - 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}-aarch64.rpm -r rpm-dev && \ - 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}-aarch64.tar.gz -r bin-dev -a aarch64 && \ - FALCO_VERSION=$(cat /build-static/release/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//') && \ - cp -f /build-static/release/falco-${FALCO_VERSION}-aarch64.tar.gz /build-static/release/falco-${FALCO_VERSION}-static-aarch64.tar.gz && \ - /source/falco/scripts/publish-bin -f /build-static/release/falco-${FALCO_VERSION}-static-aarch64.tar.gz -r bin-dev -a aarch64" - - "publish/packages-deb-dev-arm64": - machine: - enabled: true - image: ubuntu-2004:202101-01 - resource-class: arm.medium - steps: - - run: - name: Setup - command: | - docker run -it docker.io/debian:stable /bin/sh -c "apt update -y && \ - apt-get install apt-utils bzip2 gpg python python3-pip -y && \ - pip install awscli && \ - echo $GPG_KEY | base64 -d | gpg --import && \ - 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}-aarch64.deb -r deb-dev" + /source/falco/scripts/publish-deb -f /build/release/falco-${FALCO_VERSION}-aarch64.deb -r deb-dev # Publish docker packages "publish/docker-dev": @@ -658,6 +628,7 @@ workflows: - "build/ubuntu-bionic" - "build/centos7" - "build/centos7-debug" + - "build-arm64" - "tests/integration": requires: - "build/centos7" @@ -676,6 +647,7 @@ workflows: only: master requires: - "tests/integration" + - "build-arm64" - "publish/packages-dev": context: - falco @@ -699,6 +671,7 @@ workflows: only: master requires: - "tests/integration" + - "build-arm64" - "publish/docker-dev": context: falco filters: @@ -734,10 +707,17 @@ workflows: only: /.*/ branches: ignore: /.*/ + - "build-arm64": + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ - "rpm/sign": context: falco requires: - "build/centos7" + - "build-arm64" filters: tags: only: /.*/ @@ -761,6 +741,7 @@ workflows: - test-infra requires: - "build/centos7" + - "build-arm64" filters: tags: only: /.*/