From a0439cb90de62387c7e0c8699ed922dbd9aa50c5 Mon Sep 17 00:00:00 2001 From: Vihang Mehta Date: Sat, 24 Jun 2023 00:08:46 -0700 Subject: [PATCH] Remove unused scripts (#1572) Summary: These scripts are no longer used. Type of change: /kind cleanup Test Plan: grepped to make sure these scripts were not referenced. Signed-off-by: Vihang Mehta --- ci/jenkins.bazelrc | 45 ------------------------------ ci/write_bazelrc.sh | 36 ------------------------ scripts/generate_jenkins_secret.sh | 39 -------------------------- 3 files changed, 120 deletions(-) delete mode 100644 ci/jenkins.bazelrc delete mode 100755 ci/write_bazelrc.sh delete mode 100755 scripts/generate_jenkins_secret.sh diff --git a/ci/jenkins.bazelrc b/ci/jenkins.bazelrc deleted file mode 100644 index 93f5b91d2d4..00000000000 --- a/ci/jenkins.bazelrc +++ /dev/null @@ -1,45 +0,0 @@ -common --color=yes - -# Keep the build going even with failures. -# This makes it easier to find multiple issues in -# a given Jenkins runs. -common --keep_going - -build --build_metadata=HOST=jenkins-worker -build --build_metadata=USER=jenkins -build --build_metadata=REPO_URL=https://github.com/pixie-io/pixie -build --verbose_failures - -test --verbose_failures - -# BES/Cache Setup -build --bes_timeout=10m -build --experimental_inmemory_dotd_files -build --experimental_inmemory_jdeps_files -build --keep_backend_build_event_connections_alive=false -build --remote_max_connections=128 -build --remote_retries=2 -build --remote_timeout=1h - - -test --bes_timeout=10m -test --experimental_inmemory_dotd_files -test --experimental_inmemory_jdeps_files -test --remote_max_connections=128 -test --remote_retries=2 - -# Limit resources, this is needed to stay under the K8s resource allocations. -build --local_ram_resources=40000 -test --local_ram_resources=40000 - -# We have 14 CPUs allocated. -build --local_cpu_resources=14 -test --local_cpu_resources=14 - -build --jobs 16 -test --jobs 16 - -# BPF machines are bit bigger. -build:bpf --local_cpu_resources=32 -build:bpf --jobs 32 -test:bpf --jobs 16 diff --git a/ci/write_bazelrc.sh b/ci/write_bazelrc.sh deleted file mode 100755 index 7dde19953f5..00000000000 --- a/ci/write_bazelrc.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -ex - -# Copyright 2018- The Pixie Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -cp ci/jenkins.bazelrc jenkins.bazelrc - -echo "build --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}" >> jenkins.bazelrc -echo "build --client_env=GH_API_KEY=${GH_API_KEY}" >> jenkins.bazelrc - -if [[ "$JOB_NAME" == 'pixie-main/build-and-test-all' ]] || [[ "$JOB_NAME" == 'pixie-oss/build-and-test-all' ]]; then - # Only set ROLE=CI if this is running on main. This controls the whether this - # run contributes to the test matrix at https://bb.corp.pixielabs.ai/tests/ - echo "build --build_metadata=ROLE=CI" >> jenkins.bazelrc -else - # Don't upload to remote cache if this is not running main. - echo "build --remote_upload_local_results=false" >> jenkins.bazelrc - echo "build --build_metadata=ROLE=DEV" >> jenkins.bazelrc -fi - -if [[ "$JOB_NAME" == "pixie-oss/"* ]]; then - echo "build --build_metadata=VISIBILITY=PUBLIC" >> jenkins.bazelrc -fi diff --git a/scripts/generate_jenkins_secret.sh b/scripts/generate_jenkins_secret.sh deleted file mode 100755 index c8e0f9f697a..00000000000 --- a/scripts/generate_jenkins_secret.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -e - -# Copyright 2018- The Pixie Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -# This script can be used to generate secret tokens used by Jenkins. -# Any cluster accessed by Jenkins needs credentials to be registered -# in the UI under: https://jenkins.pixielabs.ai/credentials. - -namespace=default -account_name=jenkins-robot - -kubectl -n ${namespace} create serviceaccount ${account_name} - -# The next line gives `${account_name}` administator permissions for this namespace. -kubectl -n ${namespace} create clusterrolebinding "${account_name}-binding" \ - --clusterrole=cluster-admin --serviceaccount="${namespace}:${account_name}" - -# Get the name of the token that was automatically generated for the ServiceAccount `${account_name}`. -token_name=$(kubectl -n ${namespace} get serviceaccount "${account_name}" \ - -o go-template --template='{{range .secrets}}{{.name}}{{"\n"}}{{end}}') - -# Retrieve the token and decode it using base64. -kubectl -n ${namespace} get secrets "${token_name}" -o go-template \ - --template '{{index .data "token"}}' | base64 -d -printf "\n"