From 8d4b7ad526c296f65088866845c9e24f552428a6 Mon Sep 17 00:00:00 2001 From: Lucas Manuel Rodriguez Date: Mon, 26 Aug 2024 13:28:25 -0300 Subject: [PATCH] Remove unused workflow and dockerfile (#21551) - `.github/workflows/push-osquery-perf-to-ecr.yml` has 0 workflow runs (added but never used) - `Dockerfile.osquery-perf` is only used by `.github/workflows/push-osquery-perf-to-ecr.yml`. --- .../workflows/push-osquery-perf-to-ecr.yml | 64 ------------------- Dockerfile.osquery-perf | 16 ----- 2 files changed, 80 deletions(-) delete mode 100644 .github/workflows/push-osquery-perf-to-ecr.yml delete mode 100644 Dockerfile.osquery-perf diff --git a/.github/workflows/push-osquery-perf-to-ecr.yml b/.github/workflows/push-osquery-perf-to-ecr.yml deleted file mode 100644 index 0760d03900..0000000000 --- a/.github/workflows/push-osquery-perf-to-ecr.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Build docker image and publish to ECR - -on: - workflow_dispatch: - inputs: - enroll_secret: - description: 'Enroll Secret' - required: true - url: - description: 'Fleet server URL' - required: true - host_count: - description: 'Amount of hosts to emulate' - required: true - default: 20 - tag: - description: 'docker image tag' - required: true - default: latest - -# This allows a subsequently queued workflow run to interrupt previous runs -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id}} - cancel-in-progress: true - -defaults: - run: - # fail-fast using bash -eo pipefail. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference - shell: bash - -permissions: - contents: read - -jobs: - build-docker: - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 - with: - egress-policy: audit - - - name: Checkout Code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@05b148adc31e091bafbaf404f745055d4d3bc9d2 # v1 - with: - aws-access-key-id: ${{ secrets.LOADTEST_AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.LOADTEST_AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@2f9f10ea3fa2eed41ac443fee8bfbd059af2d0a4 # v1 - - - name: Build, tag, and push image to Amazon ECR - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY: osquery-perf - IMAGE_TAG: ${{ github.event.inputs.tag }} - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG --build-arg ENROLL_SECRET=${{ github.event.inputs.enroll_secret }} --build-arg HOST_COUNT=${{ github.event.inputs.host_count }} --build-arg SERVER_URL=${{ github.event.inputs.url }} -f Dockerfile.osquery-perf . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG diff --git a/Dockerfile.osquery-perf b/Dockerfile.osquery-perf deleted file mode 100644 index fe1fde9cf6..0000000000 --- a/Dockerfile.osquery-perf +++ /dev/null @@ -1,16 +0,0 @@ -FROM golang:1.22.6-alpine3.20@sha256:1a478681b671001b7f029f94b5016aed984a23ad99c707f6a0ab6563860ae2f3 - -ARG ENROLL_SECRET -ARG HOST_COUNT -ARG SERVER_URL - -ENV ENROLL_SECRET ${ENROLL_SECRET} -ENV HOST_COUNT ${HOST_COUNT} -ENV SERVER_URL ${SERVER_URL} - -COPY ./cmd/osquery-perf/agent.go ./go.mod ./go.sum ./cmd/osquery-perf/mac10.14.6.tmpl /osquery-perf/ -WORKDIR /osquery-perf/ -RUN go mod download -RUN go build -o osquery-perf - -CMD ./osquery-perf -enroll_secret $ENROLL_SECRET -host_count $HOST_COUNT -server_url $SERVER_URL