Skip to content

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 #273

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0

Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 #273

Workflow file for this run

name: Testing and building docker images
on:
push:
branches:
- master
pull_request:
branches: [ master ]
jobs:
unit_tests:
name: Run unit tests
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/go
GOROOT: /usr/local/go1.15
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run unit tests
run: |
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
make test
build_docker_image:
runs-on: ubuntu-latest
needs: unit_tests
name: Build reaper-operator image
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Set git parsed values
id: vars
run: |
echo ::set-output name=sha_short::$(git rev-parse --short=8 ${{ github.sha }})
echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
- name: Build image
id: docker_build
uses: docker/build-push-action@v2
with:
push: false
tags: k8ssandra/reaper-operator:${{ steps.vars.outputs.sha_short }}, k8ssandra/reaper-operator:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
outputs: type=docker,dest=/tmp/k8ssandra-reaper-operator.tar
- name: Upload reaper-operator image
uses: actions/upload-artifact@v2
with:
name: reaper-operator
path: /tmp/k8ssandra-reaper-operator.tar
run_e2e_test:
runs-on: ubuntu-latest
needs: [unit_tests, build_docker_image]
name: Run e2e tests
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Kind kube-proxy issue workaround
run: sudo sysctl net/netfilter/nf_conntrack_max=524288
- name: Create Kind Cluster
uses: helm/[email protected]
with:
version: v0.11.1
node_image: kindest/node:v1.21.2
cluster_name: kind
config: test/config/kind/w1k1.21.yaml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download reaper-operator image
uses: actions/download-artifact@v2
with:
name: reaper-operator
path: /tmp
- name: Load Docker images
run: |
docker load --input /tmp/k8ssandra-reaper-operator.tar
- name: Load image on the nodes of the cluster
run: |
kind load docker-image --name=kind k8ssandra/reaper-operator:latest
- name: Run e2e-test
run: |
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
make e2e-test
run_kuttl_test:
runs-on: ubuntu-latest
needs: [unit_tests, build_docker_image]
name: Run kuttl tests
strategy:
matrix:
k8s_version: ["1.22", "1.21", "1.20"]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Kind kube-proxy issue workaround
run: sudo sysctl net/netfilter/nf_conntrack_max=524288
- name: Download reaper-operator image
uses: actions/download-artifact@v2
with:
name: reaper-operator
path: /tmp
- name: Load Docker images
run: |
docker load --input /tmp/k8ssandra-reaper-operator.tar
- name: Run kuttl-test
run: |
# We are running tests against k8s 1.20 - 1.22 currently.
# Additional versions must be added in kind config files under ./test/config/kind
make KUTTL_KIND_CFG="./test/config/kind/w1k${{ matrix.k8s_version }}.yaml" kuttl-test
push_image:
runs-on: ubuntu-latest
needs: [run_e2e_test, run_kuttl_test]
if: github.ref == 'refs/heads/master'
name: Push image
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Download reaper-operator image
uses: actions/download-artifact@v2
with:
name: reaper-operator
path: /tmp
- name: Load image
run: |
docker load --input /tmp/k8ssandra-reaper-operator.tar
- name: Push image
run: |
docker push k8ssandra/reaper-operator:latest