From 03bfb78bdfd73f422252d83ed7c2f0fa57223cc9 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:06:26 -0300 Subject: [PATCH 01/12] add agent full --- .github/workflows/agent.yml | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index 82bdad1a0..cd4d29030 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -131,3 +131,84 @@ jobs: - name: Push agent container orbcommunity if: github.event_name != 'pull_request' run: docker push -a orbcommunity/orb-agent + + + package-agent-full: + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Get branch name + shell: bash + run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV + + - name: Debug branch name + run: echo ${{ env.BRANCH_NAME }} + + - name: Generate ref tag (main) + if: ${{ env.BRANCH_NAME == 'main' || github.event.client_payload.branch_name == 'main' }} + run: | + echo "REF_TAG=latest" >> $GITHUB_ENV + + - name: Generate ref tag (develop) + if: ${{ env.BRANCH_NAME == 'develop' || github.event.client_payload.branch_name == 'develop' }} + run: | + echo "REF_TAG=develop" >> $GITHUB_ENV + + - name: Debug ref tag + run: echo ${{ env.REF_TAG }} + + - name: Append suffix on VERSION file for develop build + if: ${{ env.BRANCH_NAME == 'develop' || github.event.client_payload.branch_name == 'develop' }} + run: | + echo "`cat ${{github.workspace}}/VERSION`-${{ env.REF_TAG }}" > VERSION + + - name: Get VERSION + run: | + echo "VERSION=`cat ${{github.workspace}}/VERSION`" >> $GITHUB_ENV + + - name: Debug version + run: echo ${{ env.VERSION }} + + - name: Replace crashpad and geo-db params + run: | + ESCAPED_REPLACE_LINE1_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--cp-token\", \"${{ secrets.CRASHPAD_TOKEN }}\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE2_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--cp-url\", \"${{ secrets.CRASHPAD_URL }}\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE3_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--cp-path\", \"/usr/local/sbin/crashpad_handler\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE4_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--default-geo-city\", \"/geo-db/city.mmdb\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE5_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--default-geo-asn\", \"/geo-db/asn.mmdb\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE6_NEW=$(printf '%s\n' "pvOptions = append(pvOptions, \"--default-service-registry\", \"/iana/custom-iana.csv\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE1_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--cp-token\", PKTVISOR_CP_TOKEN)" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE2_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--cp-url\", PKTVISOR_CP_URL)" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE3_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--cp-path\", PKTVISOR_CP_PATH)" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE4_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--default-geo-city\", \"/geo-db/city.mmdb\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE5_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--default-geo-asn\", \"/geo-db/asn.mmdb\")" | sed -e 's/[\/&]/\\&/g') + ESCAPED_REPLACE_LINE6_OLD=$(printf '%s\n' "// pvOptions = append(pvOptions, \"--default-service-registry\", \"/iana/custom-iana.csv\")" | sed -e 's/[\/&]/\\&/g') + sed -i -e "s/$ESCAPED_REPLACE_LINE1_OLD/$ESCAPED_REPLACE_LINE1_NEW/g" agent/backend/pktvisor/pktvisor.go + sed -i -e "s/$ESCAPED_REPLACE_LINE2_OLD/$ESCAPED_REPLACE_LINE2_NEW/g" agent/backend/pktvisor/pktvisor.go + sed -i -e "s/$ESCAPED_REPLACE_LINE3_OLD/$ESCAPED_REPLACE_LINE3_NEW/g" agent/backend/pktvisor/pktvisor.go + sed -i -e "s/$ESCAPED_REPLACE_LINE4_OLD/$ESCAPED_REPLACE_LINE4_NEW/g" agent/backend/pktvisor/pktvisor.go + sed -i -e "s/$ESCAPED_REPLACE_LINE5_OLD/$ESCAPED_REPLACE_LINE5_NEW/g" agent/backend/pktvisor/pktvisor.go + sed -i -e "s/$ESCAPED_REPLACE_LINE6_OLD/$ESCAPED_REPLACE_LINE6_NEW/g" agent/backend/pktvisor/pktvisor.go + + - name: Build orb-agent full + shell: bash + run: | + if [ "${{ github.event.inputs.diode_tag }}" == "" ]; then + make agent_full + else + DIODE_TAG=${{ github.event.inputs.diode_tag }} make agent_full + fi + + - name: Login to Docker Hub orbcommunity + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.ORB_DOCKERHUB_USERNAME }} + password: ${{ secrets.ORB_DOCKERHUB_TOKEN }} + + - name: Push agent container orbcommunity + if: github.event_name != 'pull_request' + run: docker push -a orbcommunity/orb-agent-full From 33ac185d77465f71ae90101e6f38b493e0b7542b Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:44:42 -0300 Subject: [PATCH 02/12] Create Dockerfile.full --- agent/docker/Dockerfile.full | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 agent/docker/Dockerfile.full diff --git a/agent/docker/Dockerfile.full b/agent/docker/Dockerfile.full new file mode 100644 index 000000000..8f511b635 --- /dev/null +++ b/agent/docker/Dockerfile.full @@ -0,0 +1,39 @@ +ARG PKTVISOR_TAG=latest-develop +FROM golang:1.19-alpine AS builder + +WORKDIR /go/src/github.com/orbcommunity/orb +COPY go.mod . +RUN go mod tidy +COPY . . +RUN apk update && apk add make build-base git +RUN mkdir /tmp/build && CGO_ENABLED=1 make agent_bin && mv build/orb-agent /tmp/build/orb-agent + +FROM orbcommunity/diode-agent:${DIODE_TAG} as diode +RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ +&& cp -r "$SQPATH/suzieq" "/tmp/suzieq-mod" + +FROM orbcommunity/pktvisor:${PKTVISOR_TAG} +# adding orb-agent +RUN mkdir /opt/orb +COPY --from=builder /tmp/build/orb-agent /usr/local/bin/orb-agent +COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/agent_default.yaml /opt/orb/agent_default.yaml +COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/orb-agent-entry.sh /usr/local/bin/orb-agent-entry.sh +COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/run-agent.sh /run-agent.sh + +# adding suzieq +RUN apt-get update && apt-get install -y python3 python3-pip +RUN /usr/local/bin/python -m pip install --upgrade pip && pip install suzieq==0.20.1 + +# adding diode-agent +COPY --from=diode /usr/local/bin/diode-agent /usr/local/bin/diode-agent +COPY --from=diode /root/.suzieq /root/.suzieq + +# adding suzieq mod +COPY --from=diode /tmp/suzieq-mod /tmp/suzieq-mod +RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ +&& cp -rf "/tmp/suzieq-mod/*" "$SQPATH/suzieq/" \ +&& rm -rf /tmp/suzieq-mod + +RUN chmod a+x /run-agent.sh + +ENTRYPOINT [ "/usr/local/bin/orb-agent-entry.sh" ] From f0cf471e74187867e4386a03f01ef0322c6487aa Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:02:28 -0300 Subject: [PATCH 03/12] add input --- .github/workflows/agent.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index cd4d29030..dd7d19a8c 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -6,6 +6,9 @@ on: pktvisor_tag: description: 'pktvisor agent docker tag to package' required: true + diode_tag: + description: 'diode agent docker tag to package' + required: true repository_dispatch: types: [build-agent] From 5f16daa15eaafaa103fd462b83e94d56af30deff Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:06:22 -0300 Subject: [PATCH 04/12] add agent_full --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 851ea600c..ed12c0999 100644 --- a/Makefile +++ b/Makefile @@ -216,6 +216,15 @@ agent: --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION)-$(COMMIT_HASH) \ -f agent/docker/Dockerfile . + +agent_full: + docker build --no-cache \ + --build-arg PKTVISOR_TAG=$(PKTVISOR_TAG) \ + --build-arg DIODE_TAG=$(DIODE_TAG) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(REF_TAG) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION)-$(COMMIT_HASH) \ + -f agent/docker/Dockerfile.full . agent_debug: docker build \ From 6e8cc442a18d1e61e529cd67ece24b1389487515 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:10:02 -0300 Subject: [PATCH 05/12] fix image name --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ed12c0999..ad510accf 100644 --- a/Makefile +++ b/Makefile @@ -221,9 +221,9 @@ agent_full: docker build --no-cache \ --build-arg PKTVISOR_TAG=$(PKTVISOR_TAG) \ --build-arg DIODE_TAG=$(DIODE_TAG) \ - --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(REF_TAG) \ - --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION) \ - --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent:$(ORB_VERSION)-$(COMMIT_HASH) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(REF_TAG) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION) \ + --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION)-$(COMMIT_HASH) \ -f agent/docker/Dockerfile.full . agent_debug: From 5a47ad5560b0e1865672efb3e05e23e2bd21da8b Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:13:26 -0300 Subject: [PATCH 06/12] add default input value --- .github/workflows/agent.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index dd7d19a8c..389c1571a 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -5,10 +5,10 @@ on: inputs: pktvisor_tag: description: 'pktvisor agent docker tag to package' - required: true + default: "develop" diode_tag: description: 'diode agent docker tag to package' - required: true + default: "develop" repository_dispatch: types: [build-agent] From 66af4b6f392207bed9f95c8c4d548533db95d3bb Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:18:24 -0300 Subject: [PATCH 07/12] Update Dockerfile.full --- agent/docker/Dockerfile.full | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/docker/Dockerfile.full b/agent/docker/Dockerfile.full index 8f511b635..a6e07d5f0 100644 --- a/agent/docker/Dockerfile.full +++ b/agent/docker/Dockerfile.full @@ -8,7 +8,7 @@ COPY . . RUN apk update && apk add make build-base git RUN mkdir /tmp/build && CGO_ENABLED=1 make agent_bin && mv build/orb-agent /tmp/build/orb-agent -FROM orbcommunity/diode-agent:${DIODE_TAG} as diode +FROM orbcommunity/diode-agent:${DIODE_TAG} AS diode RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ && cp -r "$SQPATH/suzieq" "/tmp/suzieq-mod" From 8200272bf11558a0b81499ce72c173046952cd1c Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:25:23 -0300 Subject: [PATCH 08/12] update build --- agent/docker/Dockerfile.full | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/agent/docker/Dockerfile.full b/agent/docker/Dockerfile.full index a6e07d5f0..1142afbd3 100644 --- a/agent/docker/Dockerfile.full +++ b/agent/docker/Dockerfile.full @@ -1,12 +1,7 @@ -ARG PKTVISOR_TAG=latest-develop -FROM golang:1.19-alpine AS builder - -WORKDIR /go/src/github.com/orbcommunity/orb -COPY go.mod . -RUN go mod tidy -COPY . . -RUN apk update && apk add make build-base git -RUN mkdir /tmp/build && CGO_ENABLED=1 make agent_bin && mv build/orb-agent /tmp/build/orb-agent +ARG PKTVISOR_TAG=develop +ARG DIODE_TAG=develop +ARG orb_TAG=develop +FROM orbcommunity/orb-agent:${ORB_TAG} AS orb FROM orbcommunity/diode-agent:${DIODE_TAG} AS diode RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ @@ -15,10 +10,10 @@ RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ FROM orbcommunity/pktvisor:${PKTVISOR_TAG} # adding orb-agent RUN mkdir /opt/orb -COPY --from=builder /tmp/build/orb-agent /usr/local/bin/orb-agent -COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/agent_default.yaml /opt/orb/agent_default.yaml -COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/orb-agent-entry.sh /usr/local/bin/orb-agent-entry.sh -COPY --from=builder /go/src/github.com/orbcommunity/orb/agent/docker/run-agent.sh /run-agent.sh +COPY --from=orb /usr/local/bin/orb-agent /usr/local/bin/orb-agent +COPY --from=orb /opt/orb/agent_default.yaml /opt/orb/agent_default.yaml +COPY --from=orb /usr/local/bin/orb-agent-entry.sh /usr/local/bin/orb-agent-entry.sh +COPY --from=orb /run-agent.sh /run-agent.sh # adding suzieq RUN apt-get update && apt-get install -y python3 python3-pip @@ -28,7 +23,7 @@ RUN /usr/local/bin/python -m pip install --upgrade pip && pip install suzieq==0. COPY --from=diode /usr/local/bin/diode-agent /usr/local/bin/diode-agent COPY --from=diode /root/.suzieq /root/.suzieq -# adding suzieq mod +# adding suzieq modifications COPY --from=diode /tmp/suzieq-mod /tmp/suzieq-mod RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ && cp -rf "/tmp/suzieq-mod/*" "$SQPATH/suzieq/" \ From ae9f2b11cab61da31c6cdf90af285a0b64ac27ff Mon Sep 17 00:00:00 2001 From: etaques Date: Fri, 21 Apr 2023 17:59:39 -0300 Subject: [PATCH 09/12] [feat] orb agent full --- Makefile | 1 + agent/docker/Dockerfile.full | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ad510accf..82197fcf9 100644 --- a/Makefile +++ b/Makefile @@ -221,6 +221,7 @@ agent_full: docker build --no-cache \ --build-arg PKTVISOR_TAG=$(PKTVISOR_TAG) \ --build-arg DIODE_TAG=$(DIODE_TAG) \ + --build-arg ORB_TAG=$(ORB_TAG) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(REF_TAG) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION)-$(COMMIT_HASH) \ diff --git a/agent/docker/Dockerfile.full b/agent/docker/Dockerfile.full index 1142afbd3..5499d4878 100644 --- a/agent/docker/Dockerfile.full +++ b/agent/docker/Dockerfile.full @@ -1,11 +1,11 @@ ARG PKTVISOR_TAG=develop ARG DIODE_TAG=develop -ARG orb_TAG=develop +ARG ORB_TAG=develop FROM orbcommunity/orb-agent:${ORB_TAG} AS orb FROM orbcommunity/diode-agent:${DIODE_TAG} AS diode RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ -&& cp -r "$SQPATH/suzieq" "/tmp/suzieq-mod" +&& cp -rf "$SQPATH/suzieq" "/tmp/suzieq-patched" FROM orbcommunity/pktvisor:${PKTVISOR_TAG} # adding orb-agent @@ -15,19 +15,19 @@ COPY --from=orb /opt/orb/agent_default.yaml /opt/orb/agent_default.yaml COPY --from=orb /usr/local/bin/orb-agent-entry.sh /usr/local/bin/orb-agent-entry.sh COPY --from=orb /run-agent.sh /run-agent.sh +# adding diode-agent +COPY --from=diode /usr/local/bin/diode-agent /usr/local/bin/diode-agent + # adding suzieq RUN apt-get update && apt-get install -y python3 python3-pip -RUN /usr/local/bin/python -m pip install --upgrade pip && pip install suzieq==0.20.1 +RUN python3 -m pip install --upgrade pip && pip install suzieq==0.20.1 -# adding diode-agent -COPY --from=diode /usr/local/bin/diode-agent /usr/local/bin/diode-agent +# adding suzieq patched COPY --from=diode /root/.suzieq /root/.suzieq - -# adding suzieq modifications -COPY --from=diode /tmp/suzieq-mod /tmp/suzieq-mod +COPY --from=diode /tmp/suzieq-patched /tmp/suzieq-patched RUN SQPATH=$(pip show suzieq | sed -n 's/Location: \(.*\)/\1/p') \ -&& cp -rf "/tmp/suzieq-mod/*" "$SQPATH/suzieq/" \ -&& rm -rf /tmp/suzieq-mod +&& cp -rf /tmp/suzieq-patched/* "$SQPATH/suzieq/" \ +&& rm -rf /tmp/suzieq-patched RUN chmod a+x /run-agent.sh From 3befd50dadc634fae298c2c84523318f1b011d47 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:00:19 -0300 Subject: [PATCH 10/12] update makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82197fcf9..ca36f38ab 100644 --- a/Makefile +++ b/Makefile @@ -221,7 +221,7 @@ agent_full: docker build --no-cache \ --build-arg PKTVISOR_TAG=$(PKTVISOR_TAG) \ --build-arg DIODE_TAG=$(DIODE_TAG) \ - --build-arg ORB_TAG=$(ORB_TAG) \ + --build-arg ORB_TAG=${ORB_TAG} \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(REF_TAG) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION) \ --tag=$(ORB_DOCKERHUB_REPO)/$(DOCKER_IMAGE_NAME_PREFIX)-agent-full:$(ORB_VERSION)-$(COMMIT_HASH) \ From 19246e0f5f11b1a211735c568d184da26dd817d2 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:04:06 -0300 Subject: [PATCH 11/12] passing parameters to build --- .github/workflows/agent.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index 389c1571a..f7cf6f0c2 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -9,6 +9,9 @@ on: diode_tag: description: 'diode agent docker tag to package' default: "develop" + orb_tag: + description: 'orb agent docker tag to package' + default: "develop" repository_dispatch: types: [build-agent] @@ -199,11 +202,7 @@ jobs: - name: Build orb-agent full shell: bash run: | - if [ "${{ github.event.inputs.diode_tag }}" == "" ]; then - make agent_full - else - DIODE_TAG=${{ github.event.inputs.diode_tag }} make agent_full - fi + DIODE_TAG=${{ github.event.inputs.diode_tag }} PKTVISOR_TAG=${{ github.event.inputs.pktvisor_tag }} ORB_TAG=${{ github.event.inputs.orb_tag }} make agent_full - name: Login to Docker Hub orbcommunity if: github.event_name != 'pull_request' From 06d3f36abd4d4b1773ef912a254006fd2f1b9f25 Mon Sep 17 00:00:00 2001 From: "Everton H. Taques" <97463920+etaques@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:09:58 -0300 Subject: [PATCH 12/12] add dependency on step --- .github/workflows/agent.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index f7cf6f0c2..93b17feca 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -140,7 +140,7 @@ jobs: package-agent-full: - needs: build + needs: package runs-on: ubuntu-latest steps: