From a26893d22a93d9f791560bc4836204036b0a0bdb Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Wed, 1 Mar 2023 06:30:08 -0700 Subject: [PATCH] chore: Stop generating the nightly config (#12742) --- .circleci/config.yml | 38 -------------------------------------- scripts/generate_config.sh | 27 --------------------------- 2 files changed, 65 deletions(-) delete mode 100755 scripts/generate_config.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index dd58e764f..de1e5faa3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,19 +21,6 @@ executors: GOFLAGS: -p=4 commands: - generate-config: - parameters: - os: - type: string - default: "linux" - steps: - - checkout - - attach_workspace: - at: '/build' - - run: ./scripts/generate_config.sh << parameters.os >> - - store_artifacts: - path: './new-config' - destination: 'new-config' check-changed-files-or-halt: steps: - run: ./scripts/check-file-changes.sh @@ -494,17 +481,6 @@ jobs: PR=${CIRCLE_PULL_REQUEST##*/} printf -v payload '{ "pullRequestNumber": "%s" }' "$PR" curl -X POST "https://182c7jdgog.execute-api.us-east-1.amazonaws.com/prod/shareArtifacts" --data "$payload" - generate-config: - executor: telegraf-ci - steps: - - generate-config - generate-config-win: - executor: - name: win/default - shell: bash.exe - steps: - - generate-config: - os: windows workflows: version: 2 @@ -641,20 +617,6 @@ workflows: - master tags: only: /.*/ - - 'generate-config': - requires: - - 'amd64-package' - filters: - branches: - only: - - master - - 'generate-config-win': - requires: - - 'windows-package' - filters: - branches: - only: - - master - 'share-artifacts': requires: - 'i386-package' diff --git a/scripts/generate_config.sh b/scripts/generate_config.sh deleted file mode 100755 index c85dd0517..000000000 --- a/scripts/generate_config.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# This script is responsible for generating the Telegraf config found under the `etc` directory. -# This script is meant to be only ran in within the Circle CI pipeline so that the Tiger Bot can update them automatically. -# It supports Windows and Linux because the configs are different depending on the OS. - - -os=$1 # windows or linux -exe_path="/build/extracted" # Path will contain telegraf binary -config_name="telegraf.conf" - -if [ "$os" = "windows" ]; then - zip=$(/bin/find ./build/dist -maxdepth 1 -name "*windows_amd64.zip" -print) - exe_path="$PWD/build/extracted" - unzip "$zip" -d "$exe_path" - config_name="telegraf_windows.conf" - exe_path=$(/bin/find "$exe_path" -name telegraf.exe -type f -print) -else - tar_path=$(find /build/dist -maxdepth 1 -name "*linux_amd64.tar.gz" -print | grep -v ".*static.*") - mkdir "$exe_path" - tar --extract --file="$tar_path" --directory "$exe_path" - exe_path=$(find "$exe_path" -name telegraf -type f -print | grep ".*usr/bin/.*") -fi - -$exe_path config > $config_name - -mkdir ./new-config -mv $config_name ./new-config