Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump up go version, add ua to ga #179

Closed
wants to merge 1 commit into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
50 changes: 26 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Unit test
run: make test
Expand All @@ -64,22 +64,25 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes: [v1.20.1]
kubernetes: [v1.25.16]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4

- name: Set up Go 1.16.5
uses: actions/setup-go@v2
- name: Set up Go 1.19.13
uses: actions/setup-go@v4
with:
go-version: 1.16.5
go-version: 1.19.13

- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.3.0
uses: medyagh/setup-minikube@latest
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
cache: false
minikube-version: 1.31.1
driver: none
kubernetes-version: ${{ matrix.kubernetes }}
cni: calico
start-args: '--install-addons=false'

- name: Set tag
run: |
Expand All @@ -105,7 +108,7 @@ jobs:
needs: ['lint', 'unit-test', 'e2e-tests']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -116,7 +119,7 @@ jobs:
- name: Set Build Date
id: date
run: |
echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')"
echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT

- name: Set Tag
run: |
Expand All @@ -130,56 +133,55 @@ jobs:

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v4
with:
# add each registry to which the image needs to be pushed here
images: |
${{ env.IMAGE_ORG }}/cstor-csi-driver
quay.io/${{ env.IMAGE_ORG }}/cstor-csi-driver
ghcr.io/${{ env.IMAGE_ORG }}/cstor-csi-driver
tag-latest: false
tag-custom-only: true
tag-custom: |
${{ env.TAG }}
tags: |
type=raw,value=latest,enable=false
type=raw,value=${{ env.TAG }}

- name: Print Tag info
run: |
echo "BRANCH: ${BRANCH}"
echo "${{ steps.docker_meta.outputs.tags }}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: v0.5.1

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./buildscripts/cstor-csi-driver/cstor-csi-driver.Dockerfile
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Unit test
run: make test
Expand All @@ -61,22 +61,25 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes: [v1.20.1]
kubernetes: [v1.25.16]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4

- name: Set up Go 1.16
uses: actions/setup-go@v2
- name: Set up Go 1.19.13
uses: actions/setup-go@v4
with:
go-version: 1.16.5
go-version: 1.19.13

- name: Setup Minikube-Kubernetes
uses: manusa/actions-setup-minikube@v2.3.0
uses: medyagh/setup-minikube@latest
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
cache: false
minikube-version: 1.31.1
driver: none
kubernetes-version: ${{ matrix.kubernetes }}
cni: calico
start-args: '--install-addons=false'

- name: Set tag
run: |
Expand All @@ -102,21 +105,21 @@ jobs:
needs: ['lint', 'unit-test', 'e2e-tests']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: v0.5.1

- name: Build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./buildscripts/cstor-csi-driver/cstor-csi-driver.Dockerfile
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand Down Expand Up @@ -63,38 +63,38 @@ jobs:
echo "RELEASE TAG: ${RELEASE_TAG}"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
version: v0.5.1

- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./buildscripts/cstor-csi-driver/cstor-csi-driver.Dockerfile
Expand Down
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
# list only csi source code directories
#
PACKAGES = $(shell go list ./... | grep -v 'vendor\|pkg/client\|tests')
PACKAGES = $(shell go list ./... | grep -v 'pkg/client\|tests')

# Lint our code. Reference: https://golang.org/cmd/vet/
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
Expand All @@ -22,11 +22,10 @@ VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
# Tools required for different make
# targets or for development purposes
EXTERNAL_TOOLS=\
golang.org/x/tools/cmd/cover \
github.com/axw/gocov/gocov \
gopkg.in/matm/v1/gocov-html \
github.com/onsi/ginkgo/ginkgo \
github.com/onsi/gomega/...
golang.org/x/tools/cmd/cover@latest \
github.com/axw/gocov/gocov@latest \
github.com/matm/gocov-html/cmd/gocov-html@latest \
github.com/onsi/ginkgo/[email protected]

# The images can be pushed to any docker/image registeries
# like docker hub, quay. The registries are specified in
Expand Down Expand Up @@ -128,7 +127,7 @@ test: format
bootstrap:
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "+ Installing $$tool" ; \
cd && GO111MODULE=on go get $$tool; \
go install $$tool; \
done

.PHONY: csi-driver
Expand All @@ -154,7 +153,7 @@ deploy-images:
.PHONY: license-check
license-check:
@echo "--> Checking license header..."
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ! -path './vendor/*' ) ; do \
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ) ; do \
awk 'NR<=5' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
done); \
if [ -n "$${licRes}" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/test-cov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v 'vendor\|pkg/apis\|pkg/client\|tests'); do
for d in $(go list ./... | grep -v 'pkg/apis\|pkg/client\|tests'); do
#TODO - Include -race while creating the coverage profile.
go test -coverprofile=profile.out -covermode=atomic $d

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

if [ -f profile.out ]; then
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
set -e

# Create a temp dir and clean it up on exit
TEMPDIR=`mktemp -d -t csi-test.XXX`

Check warning on line 20 in buildscripts/test.sh

View workflow job for this annotation

GitHub Actions / lint

[shellcheck] reported by reviewdog 🐶 Use $(...) notation instead of legacy backticks `...`. [SC2006](https://github.com/koalaman/shellcheck/wiki/SC2006) Raw Output: ./buildscripts/test.sh:20:9:style:Use $(...) notation instead of legacy backticks `...`. [SC2006](https://github.com/koalaman/shellcheck/wiki/SC2006)
trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM

Check warning on line 21 in buildscripts/test.sh

View workflow job for this annotation

GitHub Actions / lint

[shellcheck] reported by reviewdog 🐶 Use single quotes, otherwise this expands now rather than when signalled. [SC2064](https://github.com/koalaman/shellcheck/wiki/SC2064) Raw Output: ./buildscripts/test.sh:21:14:warning:Use single quotes, otherwise this expands now rather than when signalled. [SC2064](https://github.com/koalaman/shellcheck/wiki/SC2064)

# Build the Maya binary for the tests
echo "--> Building csi"
go build -o $TEMPDIR/maya || exit 1

Check warning on line 25 in buildscripts/test.sh

View workflow job for this annotation

GitHub Actions / lint

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. [SC2086](https://github.com/koalaman/shellcheck/wiki/SC2086) Raw Output: ./buildscripts/test.sh:25:13:info:Double quote to prevent globbing and word splitting. [SC2086](https://github.com/koalaman/shellcheck/wiki/SC2086)

# Run the tests
echo "--> Running tests"
GOBIN="`which go`"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Use $(...) notation instead of legacy backticks .... SC2006

PATH=$TEMPDIR:$PATH \
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'vendor\|pkg/apis\|pkg/generated\|tests')
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'pkg/apis\|pkg/generated\|tests')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Quote this to prevent word splitting. SC2046


3 changes: 2 additions & 1 deletion buildscripts/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ set -o pipefail
# To support running this script from anywhere, we have to first cd into this directory
# so we can install the tools.
#cd $(dirname "${0}")
cd vendor/k8s.io/code-generator/
go get -d k8s.io/[email protected]
cd "$(go env GOPATH)/pkg/mod/k8s.io/[email protected]"
go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,conversion-gen,defaulter-gen}
)

Expand Down
Loading
Loading