Skip to content

Commit

Permalink
Merge pull request #378 from niladrih/v3.5.x
Browse files Browse the repository at this point in the history
Cherry-pick CI fixes to v3.5.x
  • Loading branch information
niladrih authored Jul 26, 2023
2 parents 6390e28 + 1cd9b6f commit 435b7e4
Show file tree
Hide file tree
Showing 20 changed files with 115 additions and 103 deletions.
49 changes: 24 additions & 25 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@v3

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -52,12 +52,12 @@ jobs:
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
Expand All @@ -74,12 +74,12 @@ jobs:
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
Expand All @@ -96,12 +96,12 @@ jobs:
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
Expand All @@ -120,7 +120,7 @@ jobs:
needs: ['feature-test', 'resiliency-test', 'functional-test']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -144,55 +144,54 @@ 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 }}/jiva
quay.io/${{ env.IMAGE_ORG }}/jiva
ghcr.io/${{ env.IMAGE_ORG }}/jiva
tag-latest: false
tag-custom-only: true
tag-custom: |
${{ env.IMAGE_TAG }}
tags: |
type=raw,value=latest,enable=false
type=raw,value=${{ env.IMAGE_TAG }}
- name: Print Tag info
run: |
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: ./package/jiva.Dockerfile
Expand Down
44 changes: 22 additions & 22 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@v3

- name: Shellcheck
uses: reviewdog/action-shellcheck@v1
Expand All @@ -42,26 +42,26 @@ jobs:
path: '.'
pattern: '*.sh'
exclude: './vendor/*'

feature-test:
runs-on: ubuntu-latest
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
run: go get -u golang.org/x/lint/golint

- name: Build
run: make build

- name: Test
run: make test_features

Expand All @@ -70,20 +70,20 @@ jobs:
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
run: go get -u golang.org/x/lint/golint

- name: Build
run: make build

- name: Test
run: make test_resiliency

Expand All @@ -92,45 +92,45 @@ jobs:
needs: ['lint']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go 1.14
uses: actions/setup-go@v3
- name: Set up Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.14'
go-version: '1.19'
check-latest: true

- name: Set up golint
run: go get -u golang.org/x/lint/golint

- name: Build
run: make build

- name: Test
run: |
sudo docker network create --subnet=172.18.0.0/16 stg-net;
make test_functional;
jiva:
runs-on: ubuntu-latest
needs: ['feature-test', 'resiliency-test', 'functional-test']
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- 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 Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./package/jiva.Dockerfile
Expand Down
24 changes: 12 additions & 12 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@v3

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -43,58 +43,58 @@ jobs:
id: date
run: |
echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')"
- 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 }}/jiva
quay.io/${{ env.IMAGE_ORG }}/jiva
ghcr.io/${{ env.IMAGE_ORG }}/jiva
tag-latest: true
tag-semver: |
{{version}}
tags: |
type=raw,value=latest,enable=true
type=raw,value={{version}}
- name: Print Tag info
run: |
echo "${{ steps.docker_meta.outputs.tags }}"
echo "RELEASE TAG: ${IMAGE_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: ./package/jiva.Dockerfile
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.pyc
*.pyo
*.swp
**/.idea

integration/.idea/
integration/.tox/
Expand Down
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,9 @@ _build_check_docker:
&& exit 1; \
fi;


mod: go.mod go.sum
@echo "INFO:\tVendor update"
@GO111MODULE=on go mod download
@GO111MODULE=on go mod vendor

deps: _build_check_go _build_check_docker mod
deps: _build_check_go _build_check_docker
@echo "INFO:\tVerifying dependencies for jiva"
go mod tidy

_run_ci: test_functional test_features test_resiliency
@echo "INFO:\tRun ci over jiva image"
Expand Down
1 change: 1 addition & 0 deletions app/backing_disable.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !qcow
// +build !qcow

/*
Expand Down
4 changes: 2 additions & 2 deletions ci/suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ verify_controller_quorum() {
verify_go_routine_leak() {
echo "---------------------Verify goroutine leak-------------------------"
i=0
no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep goroutine | awk '{ print $4}')
no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep "goroutine profile: total" | awk '{ print $4}')
passed=0
req_cnt=0
while [ "$i" != 30 ]; do
Expand All @@ -280,7 +280,7 @@ verify_go_routine_leak() {
sleep 2
done
wait
new_no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep goroutine | awk '{ print $4}')
new_no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep "goroutine profile: total" | awk '{ print $4}')
old=`expr $no_of_goroutine + 3`
if [ $new_no_of_goroutine -lt $old ]; then
echo "Verify_go_routine for " $1 "--passed"
Expand Down
2 changes: 1 addition & 1 deletion controller/rest/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/rancher/go-rancher/api"
)

//ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
// ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
func (s *Server) ListJournal(rw http.ResponseWriter, req *http.Request) error {
var input JournalInput
apiContext := api.GetApiContext(req)
Expand Down
1 change: 1 addition & 0 deletions error-inject/default.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !debug
// +build !debug

/*
Expand Down
Loading

0 comments on commit 435b7e4

Please sign in to comment.