Skip to content

Commit

Permalink
fix(CI): updating the source and build paths
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
  • Loading branch information
Andreagit97 committed Nov 7, 2022
1 parent 84effdc commit 8fb8141
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- run:
name: Build Falco packages 🏗️
command: |
DOCKER_BUILDKIT=1 docker build -f /tmp/source-arm64/falco/docker/builder/centos7-builder.Dockerfile --output type=local,dest=/tmp --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/falco/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" --build-arg DEST_BUILD_DIR=/build-arm64/release /tmp/source-arm64/falco
DOCKER_BUILDKIT=1 docker build -f /tmp/source-arm64/falco/docker/builder/centos7-builder.Dockerfile --output type=local,dest=/tmp --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/source/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" --build-arg DEST_BUILD_DIR=/build-arm64/release /tmp/source-arm64/falco
- store_artifacts:
path: /tmp/packages
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- run:
name: Build Falco packages 🏗️
command: |
DOCKER_BUILDKIT=1 docker build -f /source/falco/docker/builder/centos7-builder.Dockerfile --output type=local,dest=/ --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DCREATE_TEST_TARGETS=Off -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/falco/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" --build-arg DEST_BUILD_DIR=/build/release /source/falco
DOCKER_BUILDKIT=1 docker build -f /source/falco/docker/builder/centos7-builder.Dockerfile --output type=local,dest=/ --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/source/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" --build-arg DEST_BUILD_DIR=/build/release /source/falco
# Move packages under /tmp/packages
- run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Build the artifact from the docker image 🏗️
run: |
DOCKER_BUILDKIT=1 docker build -f ./docker/builder/centos7-builder.Dockerfile --output type=local,dest=export-artifacts --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DCREATE_TEST_TARGETS=Off -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/falco/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" .
DOCKER_BUILDKIT=1 docker build -f ./docker/builder/centos7-builder.Dockerfile --output type=local,dest=export-artifacts --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/source/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" .
- name: Upload deb ⏫
uses: actions/upload-artifact@v3
Expand Down
20 changes: 10 additions & 10 deletions docker/builder/centos7-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ RUN curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/downl
rm -rf /tmp/cmake-3.22.5-linux-$(uname -m)/

# Copy Falco folder from the build context
COPY . /falco
WORKDIR /falco
COPY . /source
WORKDIR /build/release

# We need `make tests` and `make all` for integration tests.
RUN source scl_source enable devtoolset-8; \
rm -rf build; \
mkdir build && cd build; \
cmake ${CMAKE_OPTIONS} ..; \
cmake ${CMAKE_OPTIONS} /source; \
make falco -j${MAKE_JOBS}; \
make package; \
make tests -j${MAKE_JOBS}
make tests -j${MAKE_JOBS}; \
make all -j${MAKE_JOBS}

FROM scratch AS export-stage

ARG DEST_BUILD_DIR="/build"

COPY --from=build-stage /falco/build/falco-*.tar.gz /packages/
COPY --from=build-stage /falco/build/falco-*.deb /packages/
COPY --from=build-stage /falco/build/falco-*.rpm /packages/
COPY --from=build-stage /falco/build/ ${DEST_BUILD_DIR}
COPY --from=build-stage /build/release/falco-*.tar.gz /packages/
COPY --from=build-stage /build/release/falco-*.deb /packages/
COPY --from=build-stage /build/release/falco-*.rpm /packages/
COPY --from=build-stage /build/release/ ${DEST_BUILD_DIR}

0 comments on commit 8fb8141

Please sign in to comment.