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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
with:
version: v1.62.2
build:
name : CI Build
strategy:
matrix:
arch:
- x64
- arm64
name : build
runs-on : runs-on,image=ubuntu22-full-${{ matrix.arch }},runner=4cpu-linux-${{ matrix.arch }},run-id=${{ github.run_id }}
steps:
- name : Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
ci :
uses: rancher/backup-restore-operator/.github/workflows/ci.yaml@release/v5.0
uses: .github/workflows/ci.yaml
permissions:
contents: read
goreleaser:
Expand Down
12 changes: 12 additions & 0 deletions charts/rancher-backup/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,18 @@ tests:
key: "example-key"
operator: "Exists"
effect: "NoSchedule"
- it: should allow image tag overrides
template: deployment.yaml
set:
image:
tag: v1.2.3-abc.42
asserts:
- matchRegex:
path: spec.template.spec.containers[0].image
pattern: v1.2.3-abc.42$
- notMatchRegex:
path: spec.template.spec.containers[0].image
pattern: v0.0.0-nope.1$
- it: should not set default imagePullSecrets
template: deployment.yaml
asserts:
Expand Down
6 changes: 5 additions & 1 deletion scripts/chart/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

echo "-- chart/test --"

echo "Must build charts first..."
$(dirname $0)/../package-helm

# skipping tests for s390x since helm v2 doesn't support s390x yet
if [ "${ARCH}" == s390x ]; then
exit 0
Expand All @@ -13,4 +16,5 @@ if [ -z "$(type -p helm)" ]; then
exit 1
fi

helm unittest ../build/charts/rancher-backup
CHART_PATH=$(realpath $(dirname $0)/../../build/charts/rancher-backup)
helm unittest $CHART_PATH
1 change: 1 addition & 0 deletions scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e

cd $(dirname $0)

./version
./test
./validate
./validate-ci
Expand Down
13 changes: 13 additions & 0 deletions scripts/clean-repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Cleaning BRO repo artifacts"

if [[ -d ./build ]]; then
echo "Cleaning old build artifacts..."
rm -rf ./build
fi

if [[ -d ./dist ]]; then
echo "Cleaning dist artifacts..."
rm -rf ./dist
fi
4 changes: 4 additions & 0 deletions scripts/hull
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ set -e

function extract_version() {
artifact_dir="$(dirname $0)/../dist/artifacts"
if [ ! -d "$artifact_dir" ]; then
$(dirname $0)/package-helm
fi

crdfilename=$( ls $artifact_dir | grep rancher-backup-crd )
regex="backup-crd-(.*)\\.tgz"
if [[ $crdfilename =~ $regex ]]
Expand Down