Skip to content

Commit 1309121

Browse files
authored
Revert "Pktvisor release 4.3.0 (#666)" (#670)
Revert "Pktvisor release 4.3.0 (#666)" (#670)
1 parent 305bbce commit 1309121

File tree

148 files changed

+1423
-6827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+1423
-6827
lines changed

.github/actions/build-cpp/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM debian:bullseye-slim
22

33
LABEL author="Everton Haise Taques <[email protected]>"
4-
LABEL maintainer="Orb Community"
4+
LABEL maintainer="NS1 Labs"
55
LABEL version="1.0.0"
66

7-
ENV BUILD_DEPS "g++ cmake make git pkgconf jq python3-pip python3-setuptools ca-certificates libasan6 zip curl python wget"
7+
ENV BUILD_DEPS "g++ cmake make git pkgconf jq python3-pip python3-setuptools ca-certificates libasan6 zip curl python"
88

99
COPY ./entrypoint.sh /entrypoint.sh
1010

@@ -15,8 +15,8 @@ WORKDIR /pktvisor-src
1515
RUN apt-get update && \
1616
apt-get upgrade --yes --force-yes && \
1717
apt-get install --yes --force-yes --no-install-recommends ${BUILD_DEPS} && \
18-
pip3 install 'conan==1.59.0' --force-reinstall
19-
18+
pip3 install conan
19+
2020
RUN chmod +x /entrypoint.sh
2121

2222
ENTRYPOINT [ "/entrypoint.sh" ]

.github/actions/build-cpp/action.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
name: 'docker'
22
author: 'Everton Haise Taques <[email protected]>'
3-
description: 'Orb Community'
3+
description: 'NS1 Labs'
44

55
inputs:
66
context:
77
description: "Docker build context"
88
required: true
99
default: "./"
10-
11-
bugsplat_key:
12-
description: "bugsplat key"
10+
11+
symbol_url:
12+
description: "symbol url"
1313
required: true
1414
default: ""
1515

16-
bugsplat_symbol_url:
17-
description: "bugsplat symbol url"
18-
required: true
19-
default: ""
20-
2116
build_type:
2217
description: "build type"
2318
required: true
2419
default: "Debug"
2520

26-
bugsplat:
27-
description: "bugsplat active"
28-
required: true
29-
default: "true"
30-
3121
asan:
3222
description: "asan"
3323
required: true

.github/actions/build-cpp/entrypoint.sh

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
function validateParams() {
44
echo "========================= Checking parameters ========================="
5-
[[ -z $INPUT_BUGSPLAT_SYMBOL_URL ]] && echo "Bugsplat symbol url is required" && exit 1 || echo "Bugsplat symbol url pŕesent"
5+
[[ -z $INPUT_SYMBOL_URL ]] && echo "Backtrace symbol url is required" && exit 1 || echo "Backtrace symbol url present"
66
}
77

88
function build() {
@@ -14,52 +14,41 @@ function build() {
1414
cp -rf /github/workspace/libs/ /pktvisor-src/libs/
1515
cp -rf /github/workspace/docker/ /pktvisor-src/docker/
1616
cp -rf /github/workspace/golang/ /pktvisor-src/golang/
17-
cp -rf /github/workspace/build/ /pktvisor-src/build/
1817
cp -rf /github/workspace/integration_tests/ /pktvisor-src/integration_tests/
1918
cp -rf /github/workspace/cmake/ /pktvisor-src/cmake/
2019
cp -rf /github/workspace/CMakeLists.txt /pktvisor-src/
2120
cp -rf /github/workspace/conanfile.txt /pktvisor-src/
2221
mkdir /tmp/build
2322
cd /tmp/build
24-
cp -rf /pktvisor-src/build/conan_home/ .
25-
chmod -R 777 /tmp/build/conan_home/
2623
conan profile new --detect default
2724
conan profile update settings.compiler.libcxx=libstdc++11 default
2825
conan config set general.revisions_enabled=1
2926
PKG_CONFIG_PATH=/local/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=$INPUT_BUILD_TYPE -DASAN=$INPUT_ASAN /pktvisor-src
3027
make all -j 4
3128
}
3229

33-
function move() {
30+
function compact() {
3431
echo "========================= Compacting binary and copying ========================="
3532
cd /tmp/build
33+
zip pktvisord.zip /tmp/build/bin/pktvisord
3634
cp -rf /tmp/build/bin/pktvisord /github/workspace/
3735
strip -s /tmp/build/bin/crashpad_handler
3836
cp -rf /tmp/build/bin/crashpad_handler /github/workspace/
3937
cp -rf /tmp/build/bin/pktvisor-reader /github/workspace/
4038
cp -rf /tmp/build/VERSION /github/workspace/
41-
chmod -R 777 /tmp/build/conan_home/
42-
cp -rf /tmp/build/conan_home/ /github/workspace/build/
39+
#version for pktvisor-cli
4340
cp -rf /pktvisor-src/golang/pkg/client/version.go /github/workspace/version.go
41+
#copy pktvisor custom iana port service names file
4442
cp -rf /pktvisor-src/src/tests/fixtures/pktvisor-port-service-names.csv /github/workspace/custom-iana.csv
4543
}
4644

47-
function publishToBugsplat() {
48-
echo "========================= Publishing symbol to bugsplat ========================="
45+
function publish() {
46+
echo "========================= Publishing symbol to backtrace ========================="
4947
cd /tmp/build
50-
if [ "$INPUT_BUGSPLAT" == "true" ]; then
51-
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/dump_syms
52-
chmod a+x ./dump_syms
53-
wget https://github.com/orb-community/CrashpadTools/raw/main/linux/symupload
54-
chmod a+x ./symupload
55-
./dump_syms /github/workspace/pktvisord > pktvisor.sym
56-
PKTVISOR_VERSION=$(cat VERSION)
57-
ls -lha
58-
./symupload -k $INPUT_BUGSPLAT_KEY pktvisor.sym $INPUT_BUGSPLAT_SYMBOL_URL$PKTVISOR_VERSION 2>/dev/null
59-
fi
48+
curl --data-binary @pktvisord.zip -H "Expect: gzip" "${INPUT_SYMBOL_URL}"
6049
}
6150

6251
validateParams
6352
build
64-
move
65-
publishToBugsplat
53+
compact
54+
publish

.github/actions/build-go/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM golang:latest
22

33
LABEL author="Everton Haise Taques <[email protected]>"
4-
LABEL maintainer="netboxlabs"
4+
LABEL maintainer="NS1 Labs"
55
LABEL version="1.0.0"
66

77
COPY ./entrypoint.sh /entrypoint.sh

.github/actions/build-go/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,8 @@ inputs:
1212
description: "Dockerfile used to build the image"
1313
required: true
1414
default: "./Dockerfile"
15-
16-
goos:
17-
description: "OS for cross-build"
18-
required: false
19-
default: "linux"
20-
21-
goarch:
22-
description: "ARCH for cross-build"
23-
required: false
24-
default: "amd64"
2515

2616
runs:
2717
using: 'docker'
2818
image: 'Dockerfile'
29-
19+

.github/actions/build-go/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function build() {
66
# Copying this from previous build (cpp)
77
cp -rf ./version.go /src/pkg/client/version.go
88
cd /src
9-
GOOS=$INPUT_GOOS GOARCH=$INPUT_GOARCH go build -o pktvisor-cli cmd/pktvisor-cli/main.go
9+
go build -o pktvisor-cli cmd/pktvisor-cli/main.go
1010
}
1111

1212
function copy() {
@@ -15,4 +15,4 @@ function copy() {
1515
}
1616

1717
build
18-
copy
18+
copy

.github/hosted-runner/amd64/user_data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
2121
#extract git actions runner installer
2222
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
2323

24-
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/orb-community/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
24+
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
2525

2626
/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log

.github/hosted-runner/arm32/user_data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
2121
#extract git actions runner installer
2222
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-x64-2.296.2.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
2323

24-
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/orb-community/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
24+
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name AMD64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
2525

2626
/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log

.github/hosted-runner/arm64/user_data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ chown ubuntu.ubuntu /actions-runner -R
2121
#extract git actions runner installer
2222
/bin/su -c "cd /actions-runner && tar xzf ./actions-runner-linux-arm64-2.294.0.tar.gz" - ubuntu >> /home/ubuntu/user-data.log
2323

24-
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/orb-community/pktvisor --token RUNNER_TOKEN --name ARM64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
24+
/bin/su -c "cd /actions-runner && ./config.sh --unattended --url https://github.com/ns1labs/pktvisor --token RUNNER_TOKEN --name ARM64_RUNNER --labels RUNNER_LABEL --work _work --runasservice" - ubuntu >> /home/ubuntu/user-data.log
2525

2626
/bin/su -c "cd /actions-runner && ./run.sh" - ubuntu >> /home/ubuntu/user-data.log

0 commit comments

Comments
 (0)