Skip to content
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
145 changes: 145 additions & 0 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: ci

on:
push:
branches:
- main
- release-*
workflow_dispatch: {}
pull_request:
branches:
- main
- release-*
paths-ignore: [docs/**, "**.md", "**.mdx", "**.png", "**.jpg"]

env:
GO_VERSION: '1.22.12'

jobs:
detect-noop:
runs-on: ubuntu-latest
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false

hub-agent-backward-compatibility:
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Ginkgo CLI
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1

- name: Prepare the fleet
run: cd test/upgrade && chmod +x setup.sh && ./setup.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'
HUB_SERVER_URL: 'https://172.19.0.2:6443'

- name: Run the Before suite
run: cd test/upgrade/before && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Upgrade the Fleet hub agent
run: cd test/upgrade && chmod +x upgrade.sh && UPGRADE_HUB_SIDE=true ./upgrade.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Run the After suite
run: cd test/upgrade/after && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

member-agent-backward-compatibility:
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Ginkgo CLI
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1

- name: Prepare the fleet
run: cd test/upgrade && chmod +x setup.sh && ./setup.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'
HUB_SERVER_URL: 'https://172.19.0.2:6443'

- name: Run the Before suite
run: cd test/upgrade/before && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Upgrade the Fleet member agent
run: cd test/upgrade && chmod +x upgrade.sh && UPGRADE_MEMBER_SIDE=true ./upgrade.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Run the After suite
run: cd test/upgrade/after && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

full-backward-compatibility:
runs-on: ubuntu-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Ginkgo CLI
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1

- name: Prepare the fleet
run: cd test/upgrade && chmod +x setup.sh && ./setup.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'
HUB_SERVER_URL: 'https://172.19.0.2:6443'

- name: Run the Before suite
run: cd test/upgrade/before && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Upgrade all Fleet agents
run: cd test/upgrade && chmod +x upgrade.sh && UPGRADE_HUB_SIDE=true UPGRADE_MEMBER_SIDE=true ./upgrade.sh 3 && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

- name: Run the After suite
run: cd test/upgrade/after && ginkgo -v -p . && cd -
env:
KUBECONFIG: '/home/runner/.kube/config'

Empty file added test/scripts/snippets.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file required ?

Empty file.
Loading
Loading