2022-05-03 14:24:28 +02:00
|
|
|
version: 2.1
|
2022-03-29 23:00:24 +02:00
|
|
|
parameters:
|
|
|
|
fastnetmon_build_version:
|
|
|
|
type: string
|
2023-03-01 15:50:21 +01:00
|
|
|
default: "1.2.5"
|
2022-06-17 14:24:11 +02:00
|
|
|
orbs:
|
|
|
|
win: circleci/windows@4.1
|
2022-02-09 15:27:32 +01:00
|
|
|
jobs:
|
2023-04-02 14:12:24 +02:00
|
|
|
build_windows:
|
|
|
|
parameters:
|
|
|
|
windows_name:
|
|
|
|
type: string
|
2023-04-02 15:33:16 +02:00
|
|
|
default_shell:
|
|
|
|
type: string
|
|
|
|
default: "c:/tools/msys64/msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here"
|
2023-04-02 14:12:24 +02:00
|
|
|
executor: << parameters.windows_name >>
|
2022-06-17 14:24:11 +02:00
|
|
|
steps:
|
2023-04-01 19:24:17 +02:00
|
|
|
- checkout
|
2022-06-17 14:24:11 +02:00
|
|
|
- run: 'Write-Host "Hello from FastNetMon"'
|
2023-04-01 19:34:45 +02:00
|
|
|
- run: choco install -y --no-progress cmake --installargs "ADD_CMAKE_TO_PATH=User"
|
2023-04-02 14:16:43 +02:00
|
|
|
- run: choco install -y --no-progress msys2
|
2023-04-01 19:34:45 +02:00
|
|
|
- run: mkdir src/build
|
2023-04-02 15:25:04 +02:00
|
|
|
- run:
|
|
|
|
name: Install dependency libraries
|
|
|
|
shell: c:/tools/msys64/msys2_shell.cmd -defterm -no-start -msys2 -full-path -here -c
|
2023-04-02 17:11:00 +02:00
|
|
|
command: pacman -S --needed --noconfirm make mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-boost mingw-w64-x86_64-cmake zip unzip mingw-w64-x86_64-capnproto mingw-w64-x86_64-grpc mingw-w64-x86_64-openssl mingw-w64-x86_64-hiredis mingw-w64-x86_64-librdkafka mingw-w64-x86_64-protobuf mingw-w64-x86_64-ncurses mingw-w64-x86_64-libpcap
|
2023-04-02 15:33:16 +02:00
|
|
|
- run:
|
|
|
|
name: Download log4cpp
|
|
|
|
shell: << parameters.default_shell >>
|
|
|
|
command: wget https://deac-riga.dl.sourceforge.net/project/log4cpp/log4cpp-1.1.x%20%28new%29/log4cpp-1.1/log4cpp-1.1.4rc3.tar.gz
|
|
|
|
- run:
|
|
|
|
name: Unpack log4cpp
|
|
|
|
shell: << parameters.default_shell >>
|
|
|
|
command: tar -xf log4cpp-1.1.4rc3.tar.gz
|
|
|
|
- run:
|
2023-04-02 15:41:56 +02:00
|
|
|
name: Patch log4cpp to compile it on msys2
|
2023-04-02 15:33:16 +02:00
|
|
|
shell: << parameters.default_shell >>
|
|
|
|
command: sed -i '/#define int64_t __int64/d' log4cpp/include/log4cpp/config-MinGW32.h
|
|
|
|
- run:
|
2023-04-02 15:41:56 +02:00
|
|
|
name: Configure log4cpp
|
2023-04-02 15:33:16 +02:00
|
|
|
shell: << parameters.default_shell >>
|
|
|
|
command: cd log4cpp && ./configure
|
|
|
|
- run:
|
|
|
|
name: Build log4cpp
|
|
|
|
shell: << parameters.default_shell >>
|
2023-04-03 22:30:52 +02:00
|
|
|
command: cd log4cpp && make -j
|
2023-04-02 15:33:16 +02:00
|
|
|
- run:
|
|
|
|
name: Install log4cpp
|
|
|
|
shell: << parameters.default_shell >>
|
2023-04-02 15:51:51 +02:00
|
|
|
command: cd log4cpp && make install
|
2023-04-02 15:25:04 +02:00
|
|
|
- run:
|
|
|
|
name: Run cmake
|
2023-04-02 15:33:16 +02:00
|
|
|
shell: << parameters.default_shell >>
|
2023-04-02 22:54:57 +02:00
|
|
|
command: cmake -DENABLE_MONGODB_SUPPORT=FALSE -DENABLE_PCAP_SUPPORT=FALSE -DLINK_WITH_ABSL=TRUE -S src -B src/build
|
2023-04-02 20:40:02 +02:00
|
|
|
- run:
|
|
|
|
name: Build
|
|
|
|
shell: << parameters.default_shell >>
|
|
|
|
command: cd src/build && ninja
|
2022-06-11 16:49:50 +02:00
|
|
|
build_macos:
|
|
|
|
macos:
|
2022-06-17 15:53:59 +02:00
|
|
|
xcode: 13.2.1
|
2023-03-07 14:15:51 +01:00
|
|
|
environment:
|
|
|
|
# We need it to address Error: No head is defined for fastnetmon
|
|
|
|
# https://github.com/Homebrew/discussions/discussions/4136
|
|
|
|
HOMEBREW_NO_INSTALL_FROM_API: 1
|
2022-06-11 16:49:50 +02:00
|
|
|
steps:
|
2022-06-11 16:53:14 +02:00
|
|
|
- checkout
|
|
|
|
- run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
2022-06-17 19:45:36 +02:00
|
|
|
- run: cp src/packaging/homebrew/fastnetmon.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/fastnetmon.rb
|
2022-11-25 14:33:03 +01:00
|
|
|
- run: brew install --build-from-source --HEAD --verbose --debug fastnetmon
|
2022-04-29 21:38:47 +02:00
|
|
|
build_debian_upstream_package:
|
2022-04-29 22:50:32 +02:00
|
|
|
machine:
|
2023-01-15 21:25:26 +01:00
|
|
|
image: ubuntu-2204:current
|
2022-04-29 21:38:47 +02:00
|
|
|
resource_class: large
|
2022-05-03 14:12:27 +02:00
|
|
|
parameters:
|
|
|
|
debian_codename:
|
|
|
|
type: string
|
2022-04-29 21:38:47 +02:00
|
|
|
steps:
|
2022-04-30 17:13:48 +02:00
|
|
|
- run:
|
|
|
|
name: Create folder to share data between host and Docker container with relaxed permissions to allow use of save / restore cache logic
|
2022-04-30 17:26:51 +02:00
|
|
|
command: sudo mkdir /data; sudo chmod 777 /data
|
2022-04-29 22:53:58 +02:00
|
|
|
- run:
|
|
|
|
name: Docker with priviledged mode to run chroot inside and we use tail -f to keep container running
|
2022-04-29 23:42:58 +02:00
|
|
|
command: sudo docker run -d -v /sys/fs/cgroup/:/sys/fs/cgroup:ro -v /data:/data:rw --privileged --cap-add SYS_ADMIN --name linux_priviledged_container debian:bullseye tail -f /dev/null
|
2022-04-29 22:50:32 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container apt-get update; true
|
2022-04-29 22:57:34 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container apt install -y dpkg-dev git pbuilder
|
2022-04-29 22:50:32 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container git clone https://github.com/pavel-odintsov/fastnetmon
|
2022-05-03 13:26:56 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container git clone https://salsa.debian.org/debian/fastnetmon.git fastnetmon-debian-salsa
|
2023-03-07 13:46:17 +01:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container rm -f fastnetmon-debian-salsa/debian/patches/series
|
2022-04-29 23:29:07 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container tar -czf fastnetmon_$(sudo docker exec -it linux_priviledged_container head -n 1 fastnetmon-debian-salsa/debian/changelog|awk '{print $2}'|sed 's/[()]//g' | sed -E 's/(\-[0-9]+)?$//').orig.tar.gz fastnetmon
|
2022-04-29 22:50:32 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container ls -la
|
2022-04-29 23:05:30 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container bash -c "cd fastnetmon && rm -rf debian && cp -a ../fastnetmon-debian-salsa/debian/ . && dpkg-buildpackage -S -sa -d"
|
2022-04-29 23:36:49 +02:00
|
|
|
- run:
|
|
|
|
name: List produced source files
|
2022-04-30 14:56:59 +02:00
|
|
|
command: sudo docker exec -it linux_priviledged_container ls -la
|
2022-04-30 16:55:10 +02:00
|
|
|
- run:
|
|
|
|
name: Show content of data folder and permissions for it
|
|
|
|
command: ls -la /data
|
2022-04-30 14:56:59 +02:00
|
|
|
- run:
|
|
|
|
name: Check that we have anything in data folder on VM
|
2022-04-29 23:05:30 +02:00
|
|
|
command: ls -la /data
|
|
|
|
- run:
|
|
|
|
name: "Run pbuilder run Docker if we have no image in place"
|
2022-06-10 21:45:05 +02:00
|
|
|
command: "sudo docker exec -it linux_priviledged_container pbuilder --create --basetgz /data/debian_base.tgz --distribution << parameters.debian_codename >>"
|
2022-04-29 22:50:32 +02:00
|
|
|
- run: ls -la /data
|
2022-05-03 14:12:27 +02:00
|
|
|
- run: sudo docker exec -it linux_priviledged_container pbuilder --build --basetgz /data/debian_base.tgz --debbuildopts "-sa" /fastnetmon_$(sudo docker exec -it linux_priviledged_container head -n 1 fastnetmon-debian-salsa/debian/changelog|awk '{print $2}'|sed 's/[()]//g').dsc
|
2022-06-18 14:58:37 +02:00
|
|
|
build_docker_x86_64:
|
2022-04-21 22:02:00 +02:00
|
|
|
machine:
|
2023-01-15 21:25:26 +01:00
|
|
|
image: ubuntu-2204:current
|
2022-04-21 22:02:00 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
2023-04-11 17:50:21 +02:00
|
|
|
- run: docker build -t ghcr.io/pavel-odintsov/fastnetmon-community:1.2.4 -t ghcr.io/pavel-odintsov/fastnetmon-community:latest - < src/Dockerfile
|
2022-04-21 22:02:00 +02:00
|
|
|
- run: sudo docker images
|
2022-04-22 00:45:14 +02:00
|
|
|
- run: echo $CR_PAT | sudo docker login ghcr.io -u pavel-odintsov --password-stdin
|
2023-04-11 17:50:21 +02:00
|
|
|
- run: sudo docker push ghcr.io/pavel-odintsov/fastnetmon-community:1.2.4
|
2022-04-21 22:02:00 +02:00
|
|
|
- run: sudo docker push ghcr.io/pavel-odintsov/fastnetmon-community:latest
|
2023-01-15 19:58:00 +01:00
|
|
|
build_gce:
|
|
|
|
machine:
|
|
|
|
# We use this image because it uses GCE instead of AWS for testing
|
|
|
|
# https://circleci.com/blog/building-android-on-circleci/
|
|
|
|
# You can find latest tag here: https://circleci.com/developer/images/image/cimg/android#image-tags
|
|
|
|
image: android:2022.09.1
|
2023-01-15 20:07:52 +01:00
|
|
|
resource_class: large
|
2023-01-15 19:58:00 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
2022-06-18 14:58:37 +02:00
|
|
|
build_docker_arm64:
|
|
|
|
machine:
|
2023-01-15 21:25:26 +01:00
|
|
|
image: ubuntu-2204:current
|
2023-01-15 19:35:20 +01:00
|
|
|
resource_class: arm.large
|
2022-06-18 14:58:37 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
2023-01-15 19:35:20 +01:00
|
|
|
- run: docker build --build-arg installer_file_name=installer_arm64 -t ghcr.io/pavel-odintsov/fastnetmon-community:1.2.3 -t ghcr.io/pavel-odintsov/fastnetmon-community:latest - < src/Dockerfile
|
2022-06-18 14:58:37 +02:00
|
|
|
- run: sudo docker images
|
2022-05-04 19:22:01 +02:00
|
|
|
build_fedora_upstream:
|
|
|
|
parameters:
|
|
|
|
docker_image:
|
|
|
|
type: string
|
|
|
|
docker:
|
|
|
|
- image: << parameters.docker_image >>
|
2022-05-05 02:19:43 +02:00
|
|
|
resource_class: large
|
2022-05-04 19:22:01 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
2022-05-04 19:27:20 +02:00
|
|
|
- run: dnf install -y rpm-build rpmdevtools dnf-plugins-core
|
2022-05-28 19:09:40 +02:00
|
|
|
- run: mkdir -p ~/rpmbuild/SPECS
|
2022-05-28 19:10:59 +02:00
|
|
|
- run: cp src/packaging/fedora/fastnetmon.spec ~/rpmbuild/SPECS
|
2022-05-04 19:22:01 +02:00
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
2022-05-28 19:15:41 +02:00
|
|
|
command: dnf builddep -y ~/rpmbuild/SPECS/fastnetmon.spec
|
2022-05-04 19:22:01 +02:00
|
|
|
- run:
|
|
|
|
name: Download source
|
2022-05-28 19:09:40 +02:00
|
|
|
command: cd ~/rpmbuild && spectool -g -R SPECS/fastnetmon.spec
|
2022-05-28 19:46:27 +02:00
|
|
|
- run:
|
|
|
|
name: Added sysusers file to SOURCES
|
|
|
|
command: cp src/packaging/fedora/fastnetmon.sysusers ~/rpmbuild/SOURCES
|
2022-05-28 19:52:56 +02:00
|
|
|
- run:
|
|
|
|
name: Build source RPM
|
|
|
|
command: cd ~/rpmbuild/SPECS && rpmbuild -bs fastnetmon.spec
|
2022-05-28 19:57:24 +02:00
|
|
|
- store_artifacts:
|
2022-05-28 20:38:45 +02:00
|
|
|
path: /root/rpmbuild/SRPMS
|
2022-05-04 19:22:01 +02:00
|
|
|
- run:
|
|
|
|
name: Build RPM
|
2022-05-28 19:09:40 +02:00
|
|
|
command: cd ~/rpmbuild/SPECS && rpmbuild -bb fastnetmon.spec
|
2022-05-06 02:36:23 +02:00
|
|
|
- store_artifacts:
|
2022-05-28 20:38:45 +02:00
|
|
|
path: /root/rpmbuild/RPMS/x86_64
|
2022-06-10 20:27:03 +02:00
|
|
|
|
2022-06-10 20:52:30 +02:00
|
|
|
build_epel9_upstream:
|
2022-06-10 20:27:03 +02:00
|
|
|
docker:
|
2022-06-10 20:52:30 +02:00
|
|
|
- image: almalinux:9
|
2023-01-14 22:29:05 +01:00
|
|
|
resource_class: large
|
2022-06-10 20:27:03 +02:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: dnf install -y rpm-build rpmdevtools dnf-plugins-core
|
|
|
|
- run: dnf install -y dnf-plugins-core
|
|
|
|
- run: dnf config-manager --set-enabled crb
|
2022-06-10 20:30:45 +02:00
|
|
|
- run: dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
2022-06-10 20:27:03 +02:00
|
|
|
- run: mkdir -p ~/rpmbuild/SPECS
|
2022-06-10 20:52:30 +02:00
|
|
|
# It's copy of Fedora SPEC file with capnproto disabled because we have no package for it in EPEL: https://src.fedoraproject.org/rpms/capnproto
|
2022-06-10 20:41:23 +02:00
|
|
|
- run: cp src/packaging/epel/fastnetmon.spec ~/rpmbuild/SPECS
|
2022-06-10 20:27:03 +02:00
|
|
|
- run:
|
|
|
|
name: Install build dependencies
|
|
|
|
command: dnf builddep -y ~/rpmbuild/SPECS/fastnetmon.spec
|
|
|
|
- run:
|
|
|
|
name: Download source
|
|
|
|
command: cd ~/rpmbuild && spectool -g -R SPECS/fastnetmon.spec
|
|
|
|
- run:
|
|
|
|
name: Added sysusers file to SOURCES
|
|
|
|
command: cp src/packaging/fedora/fastnetmon.sysusers ~/rpmbuild/SOURCES
|
|
|
|
- run:
|
|
|
|
name: Build source RPM
|
|
|
|
command: cd ~/rpmbuild/SPECS && rpmbuild -bs fastnetmon.spec
|
|
|
|
- store_artifacts:
|
|
|
|
path: /root/rpmbuild/SRPMS
|
|
|
|
- run:
|
|
|
|
name: Build RPM
|
|
|
|
command: cd ~/rpmbuild/SPECS && rpmbuild -bb fastnetmon.spec
|
|
|
|
- store_artifacts:
|
|
|
|
path: /root/rpmbuild/RPMS/x86_64
|
2023-04-22 20:54:45 +02:00
|
|
|
build_debian_system_dependencies:
|
|
|
|
parameters:
|
|
|
|
docker_image:
|
|
|
|
type: string
|
|
|
|
resource_class:
|
|
|
|
type: string
|
|
|
|
default: large
|
|
|
|
machine:
|
|
|
|
image: ubuntu-2204:current
|
|
|
|
environment:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
resource_class: << parameters.resource_class >>
|
|
|
|
steps:
|
|
|
|
- run: sudo docker run --name linux_docker -d -t << parameters.docker_image >>
|
|
|
|
- run: sudo docker exec linux_docker apt-get update; true
|
2023-04-22 21:10:11 +02:00
|
|
|
- run: sudo docker exec --env DEBIAN_FRONTEND linux_docker apt-get install -y perl wget git cmake g++ make liblog4cpp5-dev libhiredis-dev libmongoc-dev libbpf-dev libgrpc++-dev libprotobuf-dev protobuf-compiler libcapnp-dev capnproto libssl-dev protobuf-compiler-grpc libncurses5-dev libpcap-dev pkg-config libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-thread-dev
|
2023-04-22 20:54:45 +02:00
|
|
|
- run: sudo docker exec linux_docker git clone https://github.com/pavel-odintsov/fastnetmon.git
|
|
|
|
- run: sudo docker exec linux_docker mkdir fastnetmon/src/build
|
|
|
|
- run: sudo docker exec linux_docker cmake -S fastnetmon/src -B fastnetmon/src/build
|
|
|
|
- run: sudo docker exec linux_docker cd fastnetmon/src/build && make -j
|
2022-04-21 21:02:40 +02:00
|
|
|
build_debian:
|
2022-04-21 21:06:12 +02:00
|
|
|
parameters:
|
2022-04-21 21:02:40 +02:00
|
|
|
docker_image:
|
|
|
|
type: string
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_version:
|
2022-04-21 21:02:40 +02:00
|
|
|
type: string
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name:
|
2022-11-30 21:15:19 +01:00
|
|
|
type: string
|
2023-02-27 23:23:37 +01:00
|
|
|
s3cmd_install_command:
|
2023-02-27 23:17:08 +01:00
|
|
|
type: string
|
2023-02-27 23:28:26 +01:00
|
|
|
default: "apt-get install -y s3cmd"
|
2023-04-10 16:38:17 +02:00
|
|
|
resource_class:
|
|
|
|
type: string
|
|
|
|
default: large
|
2023-04-10 21:41:57 +02:00
|
|
|
debian_package_architecture:
|
|
|
|
type: string
|
|
|
|
default: "amd64"
|
2023-04-10 17:15:51 +02:00
|
|
|
machine:
|
|
|
|
image: ubuntu-2204:current
|
2023-02-27 23:28:26 +01:00
|
|
|
environment:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
2023-04-10 16:38:17 +02:00
|
|
|
resource_class: << parameters.resource_class >>
|
2022-04-03 22:21:12 +02:00
|
|
|
steps:
|
2023-04-10 17:15:51 +02:00
|
|
|
- run: sudo docker run --name linux_docker -d -t << parameters.docker_image >>
|
|
|
|
- run: sudo docker exec linux_docker apt-get update; true
|
2023-04-10 17:18:57 +02:00
|
|
|
- run: sudo docker exec linux_docker apt-get install -y perl wget git
|
2023-04-10 17:29:13 +02:00
|
|
|
- run: sudo docker exec --env DEBIAN_FRONTEND linux_docker << parameters.s3cmd_install_command >>
|
2023-04-10 17:17:53 +02:00
|
|
|
- run: sudo docker exec linux_docker git clone https://github.com/pavel-odintsov/fastnetmon.git
|
2022-04-03 22:21:12 +02:00
|
|
|
- run:
|
|
|
|
name: install_gcc
|
|
|
|
no_output_timeout: 120m
|
2023-04-10 17:23:31 +02:00
|
|
|
command: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker perl fastnetmon/src/scripts/install_fastnetmon_dependencies.pl gcc_12_1_0
|
2022-04-03 22:21:12 +02:00
|
|
|
- run:
|
|
|
|
name: install_dependencies
|
2022-12-03 15:03:59 +01:00
|
|
|
no_output_timeout: 180m
|
2023-04-10 17:23:31 +02:00
|
|
|
command: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker perl fastnetmon/src/scripts/install_fastnetmon_dependencies.pl
|
2023-04-10 17:31:58 +02:00
|
|
|
- run: sudo docker exec linux_docker perl fastnetmon/src/scripts/fastnetmon_build.pl
|
2023-04-10 17:38:27 +02:00
|
|
|
- run: sudo docker exec linux_docker perl fastnetmon/src/scripts/build_library_bundle.pl /opt/fastnetmon_libraries_bundle.tar.gz
|
2023-04-10 17:23:31 +02:00
|
|
|
- run: sudo docker exec linux_docker fastnetmon/src/scripts/build_any_package.pl deb /opt/fastnetmon_libraries_bundle.tar.gz << pipeline.parameters.fastnetmon_build_version >> << parameters.distro_name >> << parameters.distro_version >>
|
2023-04-10 21:41:57 +02:00
|
|
|
- run: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker s3cmd --disable-multipart --host=storage.googleapis.com --host-bucket="%(bucket).storage.googleapis.com" put /tmp/fastnetmon_<< pipeline.parameters.fastnetmon_build_version >>_<< parameters.debian_package_architecture >>.deb s3://fastnetmon_community_packages/<< pipeline.parameters.fastnetmon_build_version >>/<< parameters.distro_name >>/<< parameters.distro_version >>/fastnetmon_<< pipeline.parameters.fastnetmon_build_version >>_<< parameters.debian_package_architecture >>.deb
|
2023-04-10 17:45:54 +02:00
|
|
|
- run: sudo docker exec linux_docker cp fastnetmon/src/fastnetmon.conf /etc/fastnetmon.conf
|
2023-04-10 17:15:51 +02:00
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon
|
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon_client
|
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon_api_client
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon_api_client --help
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon_client --help
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon --configuration_check
|
2022-04-21 21:36:09 +02:00
|
|
|
build_centos:
|
|
|
|
parameters:
|
|
|
|
docker_image:
|
|
|
|
type: string
|
|
|
|
centos_version:
|
|
|
|
type: string
|
2023-04-10 23:06:06 +02:00
|
|
|
resource_class:
|
|
|
|
type: string
|
|
|
|
default: large
|
2023-04-11 17:50:21 +02:00
|
|
|
centos_package_architecture:
|
|
|
|
type: string
|
|
|
|
default: "x86_64"
|
2023-01-15 21:34:09 +01:00
|
|
|
machine:
|
|
|
|
image: ubuntu-2204:current
|
2023-04-10 23:06:06 +02:00
|
|
|
resource_class: << parameters.resource_class >>
|
2022-02-09 15:27:32 +01:00
|
|
|
steps:
|
2023-01-15 21:34:09 +01:00
|
|
|
- run: sudo docker run --name linux_docker -d -t << parameters.docker_image >>
|
|
|
|
- run: sudo docker exec linux_docker yum install -y perl wget python3-pip perl-Archive-Tar git
|
|
|
|
- run: sudo docker exec linux_docker git clone https://github.com/pavel-odintsov/fastnetmon.git
|
2023-01-15 21:35:43 +01:00
|
|
|
- run: sudo docker exec linux_docker pip3 install s3cmd
|
2022-03-13 16:18:21 +01:00
|
|
|
- run:
|
|
|
|
name: install_gcc
|
2022-04-02 02:42:22 +02:00
|
|
|
no_output_timeout: 120m
|
2023-01-15 21:42:29 +01:00
|
|
|
command: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker perl fastnetmon/src/scripts/install_fastnetmon_dependencies.pl gcc_12_1_0
|
2022-02-09 15:27:32 +01:00
|
|
|
- run:
|
|
|
|
name: install_dependencies
|
2022-12-02 20:20:54 +01:00
|
|
|
no_output_timeout: 180m
|
2023-01-15 21:42:29 +01:00
|
|
|
command: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker perl fastnetmon/src/scripts/install_fastnetmon_dependencies.pl
|
2023-01-15 21:39:49 +01:00
|
|
|
- run: sudo docker exec linux_docker perl fastnetmon/src/scripts/fastnetmon_build.pl
|
2023-01-15 21:42:29 +01:00
|
|
|
- run: sudo docker exec linux_docker perl fastnetmon/src/scripts/build_library_bundle.pl /opt/fastnetmon_libraries_bundle.tar.gz
|
2023-01-15 21:39:49 +01:00
|
|
|
- run: sudo docker exec linux_docker fastnetmon/src/scripts/build_any_package.pl rpm /opt/fastnetmon_libraries_bundle.tar.gz << pipeline.parameters.fastnetmon_build_version >> centos << parameters.centos_version >>
|
2023-04-11 17:50:21 +02:00
|
|
|
- run: sudo -E docker exec --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY linux_docker s3cmd --disable-multipart --host=storage.googleapis.com --host-bucket="%(bucket).storage.googleapis.com" put /tmp/result_data/fastnetmon-<< pipeline.parameters.fastnetmon_build_version >>-1.el<< parameters.centos_version >>.<< parameters.centos_package_architecture >>.rpm s3://fastnetmon_community_packages/<< pipeline.parameters.fastnetmon_build_version >>/centos/<< parameters.centos_version >>/fastnetmon-<< pipeline.parameters.fastnetmon_build_version >>-1.el<< parameters.centos_version >>.<< parameters.centos_package_architecture >>.rpm
|
2023-01-15 21:39:49 +01:00
|
|
|
- run: sudo docker exec linux_docker cp fastnetmon/src/fastnetmon.conf /etc/fastnetmon.conf
|
2023-01-15 21:34:09 +01:00
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon
|
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon_client
|
|
|
|
- run: sudo docker exec linux_docker ldd /opt/fastnetmon-community/app/bin/fastnetmon_api_client
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon_api_client --help
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon_client --help
|
|
|
|
- run: sudo docker exec linux_docker /opt/fastnetmon-community/app/bin/fastnetmon --configuration_check
|
2022-02-09 15:27:32 +01:00
|
|
|
workflows:
|
2022-02-09 15:27:32 +01:00
|
|
|
version: 2
|
|
|
|
all_distros:
|
2022-02-09 15:27:32 +01:00
|
|
|
jobs:
|
2022-04-21 21:36:58 +02:00
|
|
|
- build_centos:
|
2022-04-21 21:36:09 +02:00
|
|
|
docker_image: centos:centos7
|
2022-04-21 21:37:46 +02:00
|
|
|
centos_version: "7"
|
2022-04-21 21:36:09 +02:00
|
|
|
name: "centos7"
|
2022-04-21 21:36:58 +02:00
|
|
|
- build_centos:
|
2022-04-21 21:36:09 +02:00
|
|
|
docker_image: almalinux:8
|
2022-04-21 21:37:46 +02:00
|
|
|
centos_version: "8"
|
2022-04-21 21:36:09 +02:00
|
|
|
name: "centos8"
|
2023-04-11 11:37:11 +02:00
|
|
|
- build_centos:
|
|
|
|
docker_image: almalinux:8
|
|
|
|
centos_version: "8"
|
|
|
|
name: "centos8_arm"
|
|
|
|
resource_class: "arm.large"
|
2023-04-11 18:09:40 +02:00
|
|
|
centos_package_architecture: "aarch64"
|
2022-05-15 17:29:22 +02:00
|
|
|
- build_centos:
|
|
|
|
docker_image: almalinux:9
|
|
|
|
centos_version: "9"
|
|
|
|
name: "centos9"
|
2023-04-11 11:37:11 +02:00
|
|
|
- build_centos:
|
|
|
|
docker_image: almalinux:9
|
|
|
|
centos_version: "9"
|
|
|
|
name: "centos9_arm"
|
|
|
|
resource_class: "arm.large"
|
2023-04-11 18:09:40 +02:00
|
|
|
centos_package_architecture: "aarch64"
|
2022-12-03 15:03:59 +01:00
|
|
|
- build_debian:
|
2022-04-21 20:32:41 +02:00
|
|
|
docker_image: "ubuntu:jammy"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_version: "22.04"
|
2022-04-21 20:32:41 +02:00
|
|
|
name: "ubuntu2204"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "ubuntu"
|
2023-04-10 16:38:17 +02:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "ubuntu:jammy"
|
|
|
|
distro_version: "22.04"
|
2023-04-10 17:17:53 +02:00
|
|
|
name: "ubuntu2204_arm"
|
2023-04-10 16:38:17 +02:00
|
|
|
distro_name: "ubuntu"
|
|
|
|
resource_class: "arm.large"
|
2023-04-10 21:41:57 +02:00
|
|
|
debian_package_architecture: "arm64"
|
2022-12-03 15:03:59 +01:00
|
|
|
- build_debian:
|
2022-04-21 20:32:41 +02:00
|
|
|
docker_image: "ubuntu:focal"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_version: "20.04"
|
2022-04-21 20:32:41 +02:00
|
|
|
name: "ubuntu2004"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "ubuntu"
|
2023-04-11 11:37:11 +02:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "ubuntu:focal"
|
|
|
|
distro_version: "20.04"
|
|
|
|
name: "ubuntu2004_arm"
|
|
|
|
distro_name: "ubuntu"
|
|
|
|
resource_class: "arm.large"
|
|
|
|
debian_package_architecture: "arm64"
|
2022-12-03 15:03:59 +01:00
|
|
|
- build_debian:
|
2022-04-21 20:32:41 +02:00
|
|
|
docker_image: "ubuntu:bionic"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_version: "18.04"
|
2022-04-21 20:32:41 +02:00
|
|
|
name: "ubuntu1804"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "ubuntu"
|
|
|
|
- build_debian:
|
2022-04-21 20:32:41 +02:00
|
|
|
docker_image: "ubuntu:xenial"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_version: "16.04"
|
2022-04-21 20:32:41 +02:00
|
|
|
name: "ubuntu1604"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "ubuntu"
|
2022-04-21 21:02:40 +02:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "debian:stretch"
|
2022-12-03 15:05:31 +01:00
|
|
|
distro_version: "9"
|
2022-04-21 21:02:40 +02:00
|
|
|
name: "debian9"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "debian"
|
2022-04-21 21:07:18 +02:00
|
|
|
- build_debian:
|
2022-04-21 21:02:40 +02:00
|
|
|
docker_image: "debian:buster"
|
2022-12-03 15:05:31 +01:00
|
|
|
distro_version: "10"
|
2022-04-21 21:02:40 +02:00
|
|
|
name: "debian10"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "debian"
|
2023-02-27 23:36:25 +01:00
|
|
|
# We do it this way because this version of Debian has no s3cmd in official repos for some reasons: https://packages.debian.org/sid/utils/s3cmd
|
|
|
|
s3cmd_install_command: "apt-get install -y python3-pip; pip3 install s3cmd"
|
2022-04-21 21:07:18 +02:00
|
|
|
- build_debian:
|
2022-04-21 21:02:40 +02:00
|
|
|
docker_image: "debian:bullseye"
|
2022-12-03 15:05:31 +01:00
|
|
|
distro_version: "11"
|
2022-04-21 21:02:40 +02:00
|
|
|
name: "debian11"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "debian"
|
2023-04-10 22:52:35 +02:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "debian:bullseye"
|
|
|
|
distro_version: "11"
|
|
|
|
name: "debian11_arm"
|
|
|
|
distro_name: "debian"
|
|
|
|
resource_class: "arm.large"
|
|
|
|
debian_package_architecture: "arm64"
|
2022-11-30 20:26:57 +01:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "debian:bookworm"
|
2022-12-03 15:05:31 +01:00
|
|
|
distro_version: "12"
|
2022-11-30 20:26:57 +01:00
|
|
|
name: "debian12"
|
2022-12-03 15:03:59 +01:00
|
|
|
distro_name: "debian"
|
2023-04-11 11:37:11 +02:00
|
|
|
- build_debian:
|
|
|
|
docker_image: "debian:bookworm"
|
|
|
|
distro_version: "12"
|
|
|
|
name: "debian12_arm"
|
|
|
|
distro_name: "debian"
|
|
|
|
resource_class: "arm.large"
|
|
|
|
debian_package_architecture: "arm64"
|
2022-06-18 14:58:37 +02:00
|
|
|
- build_docker_x86_64:
|
|
|
|
name: "Build Docker image on x86_64 platform"
|
2023-04-11 17:50:21 +02:00
|
|
|
# - build_docker_arm64:
|
|
|
|
# name: "Build Docker image on ARM64 platform"
|
2022-05-03 14:12:27 +02:00
|
|
|
- build_debian_upstream_package:
|
2022-05-03 14:15:45 +02:00
|
|
|
name: "Debian Sid Upstream Build"
|
|
|
|
debian_codename: "sid"
|
2023-04-22 20:54:45 +02:00
|
|
|
# To offer great developer experience we ensure that FastNetMon can be built on latest Ubuntu LTS
|
|
|
|
- build_debian_system_dependencies:
|
|
|
|
docker_image: "ubuntu:jammy"
|
|
|
|
name: "ubuntu2204_system_dependencies"
|
2022-05-21 13:52:14 +02:00
|
|
|
- build_fedora_upstream:
|
|
|
|
name: "Fedora 36 Upstream RPM"
|
|
|
|
docker_image: fedora:36
|
2022-05-28 17:00:02 +02:00
|
|
|
- build_fedora_upstream:
|
|
|
|
name: "Fedora 37 Upstream RPM"
|
|
|
|
docker_image: fedora:37
|
2022-11-30 20:26:57 +01:00
|
|
|
- build_fedora_upstream:
|
|
|
|
name: "Fedora 38 Upstream RPM"
|
|
|
|
docker_image: fedora:38
|
2022-06-10 20:52:30 +02:00
|
|
|
- build_epel9_upstream:
|
2022-06-10 20:21:00 +02:00
|
|
|
name: "EPEL 9 RPM"
|
2022-06-11 16:50:30 +02:00
|
|
|
- build_macos:
|
2022-06-11 16:49:50 +02:00
|
|
|
name: "Build on MacOS"
|
2023-04-02 14:12:24 +02:00
|
|
|
- build_windows:
|
2022-06-17 14:24:11 +02:00
|
|
|
name: "Build on Windows Server 2022"
|
2023-04-02 14:12:24 +02:00
|
|
|
windows_name: "win/server-2022"
|
|
|
|
- build_windows:
|
2022-06-17 14:18:30 +02:00
|
|
|
name: "Build on Windows Server 2019"
|
2023-04-02 14:12:24 +02:00
|
|
|
windows_name: "win/server-2019"
|