Skip to content

Commit

Permalink
Replace AbsaOSS github action (#2984)
Browse files Browse the repository at this point in the history
by running the commands directly.
  • Loading branch information
thardeck authored and aruiz14 committed Oct 29, 2024
1 parent f9e31a3 commit ed0b0da
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 99 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,15 @@ jobs:
cd e2e/assets/gitrepo
# Buildkit needed here for proper here-document support
DOCKER_BUILDKIT=1 docker build -f Dockerfile.gitserver -t nginx-git:test --build-arg="passwd=$(openssl passwd foo)" .
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Provision k3d Cluster
uses: AbsaOSS/k3d-action@v2
# k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
--agents 1
--network "nw01"
run: |
k3d cluster create upstream --wait \
--agents 1 \
--network "nw01" \
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Import Images Into k3d
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/e2e-fleet-upgrade-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ jobs:
-
name: Install Ginkgo CLI
run: go install github.com/onsi/ginkgo/v2/ginkgo
-
name: Install crust-gather CLI
run: curl -sSfL https://github.com/crust-gather/crust-gather/raw/main/install.sh | sh -s -- --yes
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Provision k3d Cluster
uses: AbsaOSS/k3d-action@v2
# k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
--agents 1
--network "nw01"
run: |
k3d cluster create upstream --wait \
--agents 1 \
--network "nw01" \
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Deploy Latest Release
Expand Down
48 changes: 21 additions & 27 deletions .github/workflows/e2e-multicluster-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,35 @@ jobs:
name: Build Docker Images
run: |
./.github/scripts/build-fleet-images.sh
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Provision k3d Cluster
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
-p "80:80@agent:0:direct"
-p "443:443@agent:0:direct"
--api-port 6443
--agents 1
run: |
k3d cluster create upstream --wait \
-p "80:80@agent:0:direct" \
-p "443:443@agent:0:direct" \
--api-port 6443 \
--agents 1 \
--network "nw01"
-
name: Provision k3d Downstream Cluster for agent-initiated registration
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "downstream"
args: >-
-p "81:80@agent:0:direct"
-p "444:443@agent:0:direct"
--api-port 6644
--agents 1
run: |
k3d cluster create downstream --wait \
-p "81:80@agent:0:direct" \
-p "444:443@agent:0:direct" \
--api-port 6644 \
--agents 1 \
--network "nw01"
-
name: Provision k3d Downstream Cluster for manager-initiated registration
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "managed-downstream"
args: >-
-p "82:80@agent:0:direct"
-p "445:443@agent:0:direct"
--api-port 6645
--agents 1
run: |
k3d cluster create managed-downstream --wait \
-p "82:80@agent:0:direct" \
-p "445:443@agent:0:direct" \
--api-port 6645 \
--agents 1 \
--network "nw01"
-
name: Import Images Into k3d
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/e2e-nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,15 @@ jobs:
./.github/scripts/build-fleet-images.sh
DOCKER_BUILDKIT=1 docker build -f e2e/assets/gitrepo/Dockerfile.gitserver -t nginx-git:test --build-arg="passwd=$(openssl passwd foo)" e2e/assets/gitrepo
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Provision k3d Cluster
uses: AbsaOSS/k3d-action@v2
# k3d will automatically create a network named k3d-test-cluster-1 with the range 172.18.0.0/16
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
--agents 1
--network "nw01"
run: |
k3d cluster create upstream --wait \
--agents 1 \
--network "nw01" \
--image docker.io/rancher/k3s:${{matrix.k3s_version}}
-
name: Import Images Into k3d
Expand Down
45 changes: 21 additions & 24 deletions .github/workflows/e2e-rancher-upgrade-fleet-to-head-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,35 +103,32 @@ jobs:
push: true
tags: ${{ steps.meta-fleet-agent.outputs.tags }}
labels: ${{ steps.meta-fleet-agent.outputs.labels }}
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Set up k3d control-plane cluster
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
-p "80:80@agent:0:direct"
-p "443:443@agent:0:direct"
--api-port 6443
--agents 1
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*'
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
--network "nw01"
run: |
k3d cluster create upstream --wait \
-p "80:80@agent:0:direct" \
-p "443:443@agent:0:direct" \
--api-port 6443 \
--agents 1 \
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \
--network "nw01" \
--image docker.io/rancher/k3s:${{ env.SETUP_K3S_VERSION }}
-
name: Set up k3d downstream cluster
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "downstream"
args: >-
-p "81:80@agent:0:direct"
-p "444:443@agent:0:direct"
--api-port 6644
--agents 1
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*'
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
--network "nw01"
run: |
k3d cluster create downstream --wait \
-p "81:80@agent:0:direct" \
-p "444:443@agent:0:direct" \
--api-port 6644 \
--agents 1 \
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \
--network "nw01" \
--image docker.io/rancher/k3s:${{ env.SETUP_K3S_VERSION }}
-
name: Set up latest Rancher
Expand Down
45 changes: 21 additions & 24 deletions .github/workflows/e2e-rancher-upgrade-fleet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,32 @@ jobs:
wget -q https://github.com/rancher/cli/releases/download/v2.6.0/rancher-linux-amd64-v2.6.0.tar.gz
tar -xz --strip-components=2 -f rancher-linux-amd64-v2.6.0.tar.gz -C /home/runner/.local/bin
rancher --version
-
name: Install k3d
run: curl --silent --fail https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${{ env.SETUP_K3D_VERSION }} bash
-
name: Set up k3d control-plane cluster
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "upstream"
args: >-
-p "80:80@agent:0:direct"
-p "443:443@agent:0:direct"
--api-port 6443
--agents 1
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*'
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
--network "nw01"
run: |
k3d cluster create upstream --wait \
-p "80:80@agent:0:direct" \
-p "443:443@agent:0:direct" \
--api-port 6443 \
--agents 1 \
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \
--network "nw01" \
--image docker.io/rancher/k3s:${{github.event.inputs.k3s_version}}
-
name: Set up k3d downstream cluster
uses: AbsaOSS/k3d-action@v2
with:
k3d-version: ${{ env.SETUP_K3D_VERSION }}
cluster-name: "downstream"
args: >-
-p "81:80@agent:0:direct"
-p "444:443@agent:0:direct"
--api-port 6644
--agents 1
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*'
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
--network "nw01"
run: |
k3d cluster create downstream --wait \
-p "81:80@agent:0:direct" \
-p "444:443@agent:0:direct" \
--api-port 6644 \
--agents 1 \
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' \
--network "nw01" \
--image docker.io/rancher/k3s:${{github.event.inputs.k3s_version}}
-
name: Set up Rancher
Expand Down

0 comments on commit ed0b0da

Please sign in to comment.