-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexandre Lamarre <[email protected]> add BRO CI to gha CI Signed-off-by: Alexandre Lamarre <[email protected]> rename K8S_VERSION_FROM_DRONE to K8S_VERSION_FROM_CI Signed-off-by: Alexandre Lamarre <[email protected]> publish images CI Signed-off-by: Alexandre Lamarre <[email protected]> ammend CI to use specific kubernetes versions Signed-off-by: Alexandre Lamarre <[email protected]> update platform format Signed-off-by: Alexandre Lamarre <[email protected]> remove integration tests from make CI Signed-off-by: Alexandre Lamarre <[email protected]> [DROP ME] temporarily disable CI action Signed-off-by: Alexandre Lamarre <[email protected]> add barebones e2e tests action, with k3d setup Signed-off-by: Alexandre Lamarre <[email protected]> modify integration to run off of kube context only e2e test Signed-off-by: Alexandre Lamarre <[email protected]> standardize versioning info linkflags Signed-off-by: Alexandre Lamarre <[email protected]> temprorary changes to e2e gha Signed-off-by: Alexandre Lamarre <[email protected]> use k3d inside dapper Signed-off-by: Alexandre Lamarre <[email protected]> add kubectl to dapper Signed-off-by: Alexandre Lamarre <[email protected]> fix import image in cluster Signed-off-by: Alexandre Lamarre <[email protected]> temporarily disable e2e ci because its useless Signed-off-by: Alexandre Lamarre <[email protected]> re-enable CI Signed-off-by: Alexandre Lamarre <[email protected]> disable command tracing for setup cluster Signed-off-by: Alexandre Lamarre <[email protected]> copy /dist/artifacts to /tmp/dist/artifacts inside dapper container Signed-off-by: Alexandre Lamarre <[email protected]> change deploy script basedir in integration script Signed-off-by: Alexandre Lamarre <[email protected]> comment out code that handles 'k3s kubectl' Signed-off-by: Alexandre Lamarre <[email protected]> change integration path Signed-off-by: Alexandre Lamarre <[email protected]> tests should be ../tests Signed-off-by: Alexandre Lamarre <[email protected]> force specific kubectl context Signed-off-by: Alexandre Lamarre <[email protected]> try and use correct kube context Signed-off-by: Alexandre Lamarre <[email protected]> fix order Signed-off-by: Alexandre Lamarre <[email protected]> maybe setting up buildx fixes the nodes not coming up Signed-off-by: Alexandre Lamarre <[email protected]>
- Loading branch information
1 parent
cf60789
commit 167296e
Showing
17 changed files
with
373 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Backup Restore CI | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '*.md' | ||
- '.gitignore' | ||
- 'CODEOWNERS' | ||
- 'LICENSE' | ||
|
||
jobs: | ||
build: | ||
name : CI | ||
runs-on : ubuntu-latest | ||
strategy: | ||
matrix: | ||
K8S_VERSION_FROM_CI : ["v1.24","stable"] | ||
include: | ||
- platform: linux/amd64 | ||
- platform: linux/arm64 | ||
steps: | ||
- name : Checkout repository | ||
uses : actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name : Setup environment variables | ||
run : echo "K8S_VERSION_FROM_CI=${{ matrix.K8S_VERSION_FROM_CI }}" >> $GITHUB_ENV | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name : CI | ||
run : make ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# name: Backup Restore CI | ||
|
||
# on: | ||
# push: | ||
# paths-ignore: | ||
# - 'docs/**' | ||
# - '*.md' | ||
# - '.gitignore' | ||
# - 'CODEOWNERS' | ||
# - 'LICENSE' | ||
|
||
# env : | ||
# K3D_VERSION : v5.4.6 | ||
# CLUSTER_NAME : backup-restore | ||
|
||
# jobs: | ||
# e2e: | ||
# name : e2e-test | ||
# runs-on : ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# K8S_VERSION_FROM_CI : ["v1.24","stable"] | ||
# include: | ||
# - platform: linux/amd64 | ||
# - platform: linux/arm64 | ||
# steps: | ||
# - name : Checkout repository | ||
# uses : actions/checkout@v4 | ||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
# - name : Install K3D | ||
# run : ./.github/workflows/e2e/scripts/install-k3d.sh | ||
# - name : Install minio client | ||
# run : | | ||
# curl https://dl.min.io/client/mc/release/linux-amd64/mc > mc | ||
# mv mc /usr/local/bin/ | ||
# - name : Setup environment variables | ||
# run : echo "K8S_VERSION_FROM_CI=${{ matrix.K8S_VERSION_FROM_CI }}" >> $GITHUB_ENV | ||
# - name : CI | ||
# run : make ci | ||
# - name : Setup Cluster | ||
# run : ./.github/workflows/e2e/scripts/setup-cluster.sh | ||
# - name : Cluster info | ||
# run: | | ||
# kubectl cluster-info --context k3d-${{ env.CLUSTER_NAME }} | ||
# kubectl config use-context k3d-${{ env.CLUSTER_NAME }} | ||
# kubectl get nodes -o wide | ||
# - name : Import BRO images | ||
# run : k3d image import ${{ env.REPO }}/rancher/backup-restore-operator:${{ env.TAG}} -c ${{ env.CLUSTER_NAME }} | ||
# - name : e2e test | ||
# run : ./scripts/integration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
K3D_URL=https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | ||
DEFAULT_K3D_VERSION=v5.4.6 | ||
|
||
install_k3d(){ | ||
local k3dVersion=${K3D_VERSION:-${DEFAULT_K3D_VERSION}} | ||
echo -e "Downloading k3d@${k3dVersion} see: ${K3D_URL}" | ||
curl --silent --fail ${K3D_URL} | TAG=${k3dVersion} bash | ||
} | ||
|
||
|
||
|
||
install_k3d | ||
|
||
k3d version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name : Publish Images | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
REGISTRY: docker.io | ||
REPO : rancher | ||
|
||
jobs: | ||
push: | ||
name : Build and push BRO images | ||
runs-on : ubuntu-latest | ||
steps: | ||
- name : Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name : CI | ||
run : make ci | ||
# setup tag name | ||
- if: ${{ startsWith(github.ref, 'refs/tags/') }} | ||
run: | | ||
echo TAG_NAME=$(echo $GITHUB_REF | sed -e "s|refs/tags/||") >> $GITHUB_ENV | ||
- name: Build and push BRO image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./package/Dockerfile | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.REPO }}/backup-restore-operator:${{ env.TAG_NAME }} | ||
platforms: linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
builds: | ||
- id: backup-restore-operator | ||
main: ./main.go | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
binary: backup-restore-operator | ||
ldflags: | ||
- -extldflags | ||
- -static | ||
- -s | ||
flags: | ||
- -trimpath | ||
env: | ||
- CGO_ENABLED=0 | ||
# same archives as opentelemetry-collector releases | ||
archives: | ||
- id: backup-restore-operator | ||
builds: | ||
- pushprox-client | ||
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
|
||
# The lines beneath this are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set -e | ||
set -x | ||
|
||
k3d cluster delete ${CLUSTER_NAME} || true |
Oops, something went wrong.