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

ci: Replace manual install of kubectl with ADO KubectlInstaller task #2307

Merged
merged 2 commits into from
Oct 19, 2023
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
7 changes: 4 additions & 3 deletions .pipelines/singletenancy/aks-swift/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- task: KubectlInstaller@0
inputs:
kubectlVersion: latest

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand Down Expand Up @@ -58,9 +62,6 @@ steps:
- script: |
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
sudo -E env "PATH=$PATH" make test-integration CNS_VERSION=$(make cns-version) CNI_DROPGZ_VERSION=$(dropgzVersion) INSTALL_CNS=true INSTALL_AZURE_VNET=true TEST_DROPGZ=${{ parameters.testDropgz }}
Expand Down
3 changes: 3 additions & 0 deletions .pipelines/singletenancy/aks/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ steps:
echo '##vso[task.prependpath]$(GOROOT)/bin'
name: "GoEnv"
displayName: "Set up the Go environment"
- task: KubectlInstaller@0
inputs:
kubectlVersion: latest
- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- task: KubectlInstaller@0
inputs:
kubectlVersion: latest

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand All @@ -31,15 +35,8 @@ steps:
inlineScript: |
set -e
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
name: "installKubectl"
displayName: "Install Kubectl"
name: "kubeconfig"
displayName: "Set Kubeconfig"

- ${{ if eq( parameters['testDropgz'], true) }}:
- script: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- task: KubectlInstaller@0
inputs:
kubectlVersion: latest

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand All @@ -33,9 +37,6 @@ steps:
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then FILE_PATH=-nightly && echo "Running nightly"; fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- task: KubectlInstaller@0
inputs:
kubectlVersion: latest

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand All @@ -33,9 +37,6 @@ steps:
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
echo "deploy Cilium ConfigMap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ steps:
name: "GoEnv"
displayName: "Set up the Go environment"

- task: KubectlInstaller@0
inputs:
kubectlVersion: latest

- task: AzureCLI@2
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
Expand All @@ -25,16 +29,8 @@ steps:
inlineScript: |
set -e
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
ls -lah
pwd
echo "installing kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl cluster-info
kubectl get po -owide -A
retryCountOnTaskFailure: 3
name: "installKubectl"
displayName: "Install Kubectl"
name: "kubeconfig"
displayName: "Set Kubeconfig"

- ${{ if eq( parameters['testDropgz'], true) }}:
- script: |
Expand Down