|
| 1 | +name: Upgrade Tests |
| 2 | +on: [push, pull_request, workflow_dispatch] |
| 3 | + |
| 4 | +jobs: |
| 5 | + upgrade-tests: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + timeout-minutes: 90 |
| 8 | + concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | + env: |
| 13 | + BRANCH_NAME: ${{ github.event.inputs.branch || 'master' }} |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Checkout noobaa-core (master/input branch) |
| 17 | + uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + repository: 'noobaa/noobaa-core' |
| 20 | + path: 'noobaa-core' |
| 21 | + ref: ${{ env.BRANCH_NAME }} |
| 22 | + |
| 23 | + - name: Deploy minikube |
| 24 | + run: | |
| 25 | + cd ./noobaa-core |
| 26 | + sudo bash ./.travis/deploy_minikube.sh |
| 27 | +
|
| 28 | + - name: Build noobaa tester (from master) |
| 29 | + run: | |
| 30 | + cd ./noobaa-core |
| 31 | + make tester TESTER_TAG=noobaa-tester:upgrade-tests |
| 32 | + docker tag noobaa:latest noobaa-core:upgrade-tests |
| 33 | +
|
| 34 | + - name: Checkout noobaa-operator |
| 35 | + uses: actions/checkout@v3 |
| 36 | + with: |
| 37 | + repository: 'noobaa/noobaa-operator' |
| 38 | + path: 'noobaa-operator' |
| 39 | + |
| 40 | + - name: Change settings for k8s and minikube |
| 41 | + run: | |
| 42 | + sudo mv /root/.kube /root/.minikube $HOME |
| 43 | + sudo chown -R $USER $HOME/.kube $HOME/.minikube |
| 44 | + sed "s/root/home\/$USER/g" $HOME/.kube/config > tmp; mv tmp $HOME/.kube/config |
| 45 | +
|
| 46 | + - name: Build operator |
| 47 | + run: | |
| 48 | + cd ./noobaa-operator |
| 49 | + make all |
| 50 | +
|
| 51 | + - name: Install noobaa system |
| 52 | + run: | |
| 53 | + cd ./noobaa-operator |
| 54 | + ./build/_output/bin/noobaa-operator crd create |
| 55 | + ./build/_output/bin/noobaa-operator operator install |
| 56 | + ./build/_output/bin/noobaa-operator system create \ |
| 57 | + --db-resources='{ "limits": {"cpu": "200m","memory": "2G"}, "requests": {"cpu": "200m","memory": "2G"}}' \ |
| 58 | + --core-resources='{ "limits": {"cpu": "200m","memory": "1G"}, "requests": {"cpu": "200m","memory": "1G"}}' \ |
| 59 | + --endpoint-resources='{ "limits": {"cpu": "200m","memory": "1G"}, "requests": {"cpu": "200m","memory": "1G"}}' \ |
| 60 | + --noobaa-image='noobaa-core:upgrade-tests' |
| 61 | + ./build/_output/bin/noobaa-operator status |
| 62 | +
|
| 63 | + - name: Wait for phase Ready in the backingstore pod |
| 64 | + run: | |
| 65 | + cd ./noobaa-operator |
| 66 | + ./.travis/number_of_pods_in_system.sh --pods 5 |
| 67 | + kubectl wait --for=condition=available backingstore/noobaa-default-backing-store --timeout=5m |
| 68 | +
|
| 69 | + - name: Checkout noobaa-core (latest) |
| 70 | + uses: actions/checkout@v4 |
| 71 | + with: |
| 72 | + repository: 'noobaa/noobaa-core' |
| 73 | + path: 'noobaa-core' |
| 74 | + |
| 75 | + - name: Run Upgrade Tests (PR code) |
| 76 | + run: | |
| 77 | + set -x |
| 78 | + cd ./noobaa-core |
| 79 | + make test-upgrade |
0 commit comments