Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] ci: Cilium CLI template changes #3119

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,7 @@ steps:
name: "installCilium"
displayName: "Install Cilium on AKS Overlay"

- script: |
echo "install cilium CLI"
if [[ ${CILIUM_VERSION_TAG_V1_4} =~ ^1.1[1-3].[0-9]{1,2} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable-v0.14.txt)
else
echo "Cilium Agent Version ${CILIUM_VERSION_TAG_V1_4}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
fi
CLI_ARCH=amd64
if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
cilium status
cilium version
name: "installCiliumCLI"
displayName: "Install Cilium CLI"
- template: ../../templates/cilium-cli.yaml

- script: |
echo "Start Azilium E2E Tests on Overlay Cluster"
Expand Down
20 changes: 1 addition & 19 deletions .pipelines/singletenancy/cilium/cilium-e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,7 @@ steps:
name: "installCilium"
displayName: "Install Cilium"

- script: |
echo "install cilium CLI"
if [[ ${CILIUM_VERSION_TAG_V1_4} =~ ^1.1[1-3].[0-9]{1,2} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable-v0.14.txt)
else
echo "Cilium Agent Version ${CILIUM_VERSION_TAG_V1_4}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
fi
CLI_ARCH=amd64
if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
cilium status
cilium version
name: "installCiliumCLI"
displayName: "Install Cilium CLI"
- template: ../../templates/cilium-cli.yaml

- script: |
echo "Start Azilium E2E Tests"
Expand Down
23 changes: 23 additions & 0 deletions .pipelines/templates/cilium-cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
steps:
- script: |
echo "install cilium CLI"
if [[ ${CILIUM_VERSION_TAG_V1_4#v} =~ ^1.1[1-3].[0-9]{1,2}|1.1[1-3].[0-9]{1,2}-[0-9]{1,6} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable-v0.14.txt)
elif [[ ${CILIUM_VERSION_TAG_V1_4#v} =~ ^1.1[1-4].[0-9]{1,2}|1.1[1-4].[0-9]{1,2}-[0-9]{1,6} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
CILIUM_CLI_VERSION=v0.15.22
else
echo "Cilium Agent Version ${CILIUM_VERSION_TAG_V1_4}"
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/master/stable.txt)
fi
CLI_ARCH=amd64
if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
cilium status
cilium version
name: "installCiliumCLI"
displayName: "Install Cilium CLI"
Loading