diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e6ded3d4..6fb48cbc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,20 +37,41 @@ jobs: - name: Set up /bin permissions run: | sudo chmod -R 777 /bin + + - name: Install metal CLI + run: | + curl -L https://github.com/equinix/metal-cli/releases/download/v0.22.0/metal-linux-amd64 -o metal + chmod +x ./metal + mv ./metal /usr/local/bin/metal + metal -v + - name: Set envs run: | id=${{ matrix.CNI }}-${{ github.run_number }} - echo METRO=ny >> $GITHUB_ENV if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then id=calico-${{ github.run_number }} - echo METRO=at >> $GITHUB_ENV fi echo CLUSTER_NAME=nsm-ci-${id} >> $GITHUB_ENV echo SSH_KEY=nsm-ssh-${id} >> $GITHUB_ENV + + - name: Find metro + run: | + metros_to_check=da,ny + if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then + metros_to_check=at,ch + fi + METRO=$(metal capacity check -m ${metros_to_check} -P n3.xlarge.x86 -q 2 -o json | jq -r '[.[] | select( .available == true ) | .metro][0]') + if [ ${METRO} == "null" ]; then + exit 1; + fi + echo METRO=${METRO} >> $GITHUB_ENV + env: + METAL_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }} + - name: Set up go uses: actions/setup-go@v1 with: - go-version: 1.20.5 + go-version: 1.20.11 - name: Checkout files uses: actions/checkout@v2 with: @@ -70,24 +91,11 @@ jobs: - name: Install clusterctl run: | - curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-linux-amd64 -o clusterctl + curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.2/clusterctl-linux-amd64 -o clusterctl chmod +x ./clusterctl mv ./clusterctl /usr/local/bin/clusterctl clusterctl version - - name: Install metal CLI - run: | - curl -L https://github.com/equinix/metal-cli/releases/download/v0.16.0/metal-linux-amd64 -o metal - chmod +x ./metal - mv ./metal /usr/local/bin/metal - metal -v - - - name: Checkout deployments - uses: actions/checkout@v2 - with: - repository: networkservicemesh/deployments-k8s - path: networkservicemesh/deployments-k8s - - name: Setup ssh working-directory: ${{ github.repository }} id: setup_ssh diff --git a/go.mod b/go.mod index dc55c1e6..a369f729 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/networkservicemesh/integration-k8s-packet go 1.20 require ( - github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb + github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719 github.com/stretchr/testify v1.8.4 ) diff --git a/go.sum b/go.sum index b451ace8..603bfc66 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc h1:1L/OisEFsOyhwaqeJpYmM1nlJ2dBusUMiszPDBlUip0= github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc/go.mod h1:8EWnekTRNX+NxBdTFE24WqUoM7SgJHbiafDBrIIdOmQ= -github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb h1:1Z/rGrtqBRLhAqj8dhx71hChCdBPxRb0gzMgfUfgUP8= -github.com/networkservicemesh/integration-tests v0.0.0-20240214100638-cb08e79b30fb/go.mod h1:WLpOEldvahZQkJSdU3kspIS4tB1x1hDnWP08B/nCTjM= +github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719 h1:0TlXNQ7skuAE0QtSgmIfwEO2FCOkvLk7maSJvlxhn94= +github.com/networkservicemesh/integration-tests v0.0.0-20240307141021-83f3cb0a8719/go.mod h1:WLpOEldvahZQkJSdU3kspIS4tB1x1hDnWP08B/nCTjM= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/scripts/setup-cluster.sh b/scripts/setup-cluster.sh index 64992b73..a523b83d 100755 --- a/scripts/setup-cluster.sh +++ b/scripts/setup-cluster.sh @@ -27,7 +27,7 @@ source scripts/include/wait-pids.sh source scripts/include/wait-start.sh ## Run clusterctl -clusterctl init --infrastructure packet:v0.7.2 || exit 1 +clusterctl init --infrastructure packet:v0.8.0 || exit 1 clusterctl generate cluster ${CLUSTER_NAME} \ --kubernetes-version ${KUBERNETES_VERSION} \ --control-plane-machine-count=1 \