forked from elastic/elastic-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into feature/use-ubi-9.3
* upstream/main: Jenkins decommission (elastic#3771) Sync k8s migtraion to buildkite (elastic#3762)
- Loading branch information
Showing
15 changed files
with
101 additions
and
562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Required environment variables: | ||
# - GH_VERSION - the version of gh to install | ||
set -exuo pipefail | ||
|
||
echo "--- Install gh cli" | ||
|
||
MSG="environment variable missing." | ||
DEFAULT_HOME="/usr/local" | ||
GH_VERSION=${GH_VERSION:-$MSG} | ||
HOME=${HOME:-$DEFAULT_HOME} | ||
GH_CMD="${HOME}/bin/gh" | ||
|
||
if command -v gh | ||
then | ||
set +e | ||
echo "Found GH. Checking version.." | ||
FOUND_GH_VERSION=$(gh --version 2>&1 >/dev/null | awk '{print $3}') | ||
if [ "$FOUND_GH_VERSION" == "$GH_VERSION" ] | ||
then | ||
echo "GH Versions match: $GH_VERSION. No need to install gh. Exiting." | ||
exit 0 | ||
else | ||
echo "GH Version mismatch. Desired version: $GH_VERSION, found version: $FOUND_GH_VERSION. Installing new version." | ||
fi | ||
set -e | ||
fi | ||
|
||
source .buildkite/scripts/common.sh | ||
|
||
OS=$(uname -s| tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m| tr '[:upper:]' '[:lower:]') | ||
if [ "${ARCH}" == "aarch64" ] ; then | ||
ARCH_SUFFIX=arm64 | ||
else | ||
ARCH_SUFFIX=amd64 | ||
fi | ||
|
||
echo "Downloading gh : ${GH_VERSION}..." | ||
TMP_DIR=$(mktemp -d) | ||
if retry 5 curl -sL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz" | tar xz -C $TMP_DIR ; then | ||
mkdir -p "${HOME}/bin" | ||
mv "${TMP_DIR}/gh_${GH_VERSION}_linux_amd64/bin/gh" "${GH_CMD}" | ||
rm -rf "${TMP_DIR}" | ||
else | ||
echo "Something bad with the download, deleting the binary" | ||
if [ -e "${GH_CMD}" ] ; then | ||
rm "${GH_CMD}" | ||
fi | ||
exit 1 | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -exuo pipefail | ||
set -euo pipefail | ||
|
||
echo "--- Install Kind" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
export PATH=$HOME/bin:${PATH} | ||
|
||
source .buildkite/scripts/install-gh.sh | ||
source .buildkite/scripts/common.sh | ||
|
||
export GITHUB_TOKEN=$(retry 5 vault kv get -field token kv/ci-shared/platform-ingest/github_token) | ||
|
||
cd deploy/kubernetes | ||
|
||
echo "--- [File Creation] Create-Needed-Manifest" | ||
WITHOUTCONFIG=true make generate-k8s | ||
./creator_k8s_manifest.sh . | ||
|
||
echo "--- [Clone] Kibana-Repository" | ||
make ci-clone-kibana-repository | ||
cp Makefile ./kibana | ||
cd kibana | ||
echo "--- Create Kibana PR" | ||
make ci-create-kubernetes-templates-pull-request |
Oops, something went wrong.