Skip to content

Commit

Permalink
Merge pull request #472 from rancher/backport-gha-ci-3
Browse files Browse the repository at this point in the history
[Backport][v2.7] GHA CI
  • Loading branch information
mallardduck authored Jul 26, 2024
2 parents 6f87d4a + 348914e commit 39207bc
Show file tree
Hide file tree
Showing 19 changed files with 413 additions and 356 deletions.
249 changes: 0 additions & 249 deletions .drone.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Backup Restore CI

permissions:
contents : read

on:
workflow_call:
push:
branches:
- release/v5.0
- release/v4.0
- release/v3.0
- release/v[0-9]+.[0-9]+.[0-9]+
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
jobs:
build:
strategy:
matrix:
os : [
ubuntu-latest
# org-rancher-arm64-containers
]
name : CI
runs-on : ${{ matrix.os }}
outputs:
k3sversions: ${{ steps.support.outputs.k3sversions }}
steps:
- name : Checkout repository
uses : actions/checkout@v4
with :
fetch-depth : 0
- name: Set K3s support output
id : support
run: ./.github/workflows/scripts/supported-versions.sh | awk '{print "k3sversions="$0}' >> $GITHUB_OUTPUT
- name : CI
run : make ci
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bro-build-artifacts-${{ matrix.os }}
path: ./dist/artifacts

test:
name : integration-test
needs : [
build
]
runs-on : ${{ matrix.os }}
strategy:
matrix:
os : [
ubuntu-latest
# org-rancher-arm64-containers,
]
K3S_VERSION : ${{ fromJSON(needs.build.outputs.k3sversions) }}
steps:
- name : Checkout repository
uses : actions/checkout@v4
- name : Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: bro-build-artifacts-${{ matrix.os }}
path: ./dist/artifacts/
- name : Debug
run : ls -R ./dist/artifacts
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name : Load backup-restore-operator image
run : docker image load -i ./dist/artifacts/backup-restore-operator.img
- name : Setup up K3d
run : ./.github/workflows/scripts/install-k3d.sh
- name : Setup up mc
run : ./.github/workflows/scripts/install-mc.sh
- name : Setup k3d cluster
run : CLUSTER_NAME=backup-restore K3S_VERSION=${{ matrix.K3S_VERSION }} ./.github/workflows/scripts/setup-cluster.sh
- name : Run integration tests
run : ./scripts/integration
Loading

0 comments on commit 39207bc

Please sign in to comment.