Skip to content

Commit

Permalink
chore: bump up 3rd party dependencies
Browse files Browse the repository at this point in the history
Bump up the following 3rd dependencies:

- Bump up k6 to v0.45.0
- Bump up golang to v1.20.6
- Bump up go swagger to v0.30.5
- Bump up go openapi modoules as swagger upgraded

Signed-off-by: chlins <chenyuzh@vmware.com>
  • Loading branch information
chlins committed Aug 2, 2023
1 parent f79f0df commit b7f5dda
Show file tree
Hide file tree
Showing 469 changed files with 38,943 additions and 3,096 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
goarch: [amd64]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run go generate
run: make go-generate
Expand All @@ -48,7 +48,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: https://dl.google.com/go/go1.15.6.linux-amd64.tar.gz
goversion: https://dl.google.com/go/go1.20.6.linux-amd64.tar.gz
pre_command: export CGO_ENABLED=0
build_flags: -a -tags netgo
ldflags: -extldflags -static -X "go.k6.io/k6/lib/consts.VersionDetails=${{ needs.create-release.outputs.release-tag }}"
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: 1.20.6

- name: Run go lint
run: make go-lint
Expand All @@ -29,20 +21,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Cache go mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Generated diff test
run: make generated-diff-test
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IMG ?= heww/k6
IMG ?= goharbor/k6

GOLANG=golang:1.15.6
GOLANG=golang:1.20.6

SHELL := /bin/bash

Expand All @@ -16,8 +16,8 @@ $(BIN):
DOCKERCMD=$(shell which docker)

SWAGGER_IMAGENAME := quay.io/goswagger/swagger
SWAGGER_VERSION := 0.27.0
SWAGGER=$(DOCKERCMD) run --rm -u $(shell id -u):$(shell id -g) -v $(BUILDPATH):$(BUILDPATH) -w $(BUILDPATH) ${SWAGGER_IMAGENAME}:v${SWAGGER_VERSION}
SWAGGER_VERSION := v0.30.5
SWAGGER=$(DOCKERCMD) run --rm -u $(shell id -u):$(shell id -g) -v $(BUILDPATH):$(BUILDPATH) -w $(BUILDPATH) ${SWAGGER_IMAGENAME}:${SWAGGER_VERSION}

generate-client:
- rm -rf pkg/harbor/{models,client}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Then:

1. Clone this repostiroy
```shell
git clone https://github.com/heww/xk6-harbor
git clone https://github.com/goharbor/xk6-harbor
cd xk6-harbor
```

Expand All @@ -26,5 +26,5 @@ Then:
You can also download the latest pre-build binary file.

```shell
curl -sL $(curl -s https://api.github.com/repos/heww/xk6-harbor/releases/latest | grep 'http.*linux-amd64.tar.gz"' | awk '{print $2}' | sed 's|[\"\,]*||g') | tar -zx
curl -sL $(curl -s https://api.github.com/repos/goharbor/xk6-harbor/releases/latest | grep 'http.*linux-amd64.tar.gz"' | awk '{print $2}' | sed 's|[\"\,]*||g') | tar -zx
```
2 changes: 1 addition & 1 deletion cmd/k6/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
_ "github.com/heww/xk6-harbor"
_ "github.com/goharbor/xk6-harbor"
_ "github.com/mstoykov/xk6-counter"
k6cmd "go.k6.io/k6/cmd"
)
Expand Down
22 changes: 11 additions & 11 deletions examples/create-project.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import counter from 'k6/x/counter'
import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()
Expand Down Expand Up @@ -32,15 +32,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
return {
now: Date.now(),
}
Expand All @@ -63,9 +63,9 @@ export function teardown({ now }) {
if (teardownResources) {
const pageSize = 15

while(true) {
while (true) {
try {
const { projects } = harbor.listProjects({name: `project-${now}-`, pageSize})
const { projects } = harbor.listProjects({ name: `project-${now}-`, pageSize })

for (const project of projects) {
try {
Expand Down
20 changes: 10 additions & 10 deletions examples/create-registry.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import counter from 'k6/x/counter'
import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()
Expand Down Expand Up @@ -32,15 +32,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
return {
now: Date.now()
}
Expand All @@ -55,7 +55,7 @@ export default function ({ now }) {
type: 'harbor',
credential: {
accessKey: getEnv('HARBOR_REGISTRY_USERNAME', 'admin'),
accessSecret: getEnv('HARBOR_REGISTRY_PASSWORD', 'Harbor12345'),
accessSecret: getEnv('HARBOR_REGISTRY_PASSWORD', 'Harbor12345'),
type: "basic"
},
}
Expand Down
22 changes: 11 additions & 11 deletions examples/create-replication-policy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import counter from 'k6/x/counter'
import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()
Expand Down Expand Up @@ -32,15 +32,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
const now = Date.now()

const params = {
Expand All @@ -49,7 +49,7 @@ export function setup() {
type: 'harbor',
credential: {
accessKey: getEnv('HARBOR_REGISTRY_USERNAME', 'admin'),
accessSecret: getEnv('HARBOR_REGISTRY_PASSWORD', 'Harbor12345'),
accessSecret: getEnv('HARBOR_REGISTRY_PASSWORD', 'Harbor12345'),
type: "basic"
},
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function ({ now, registryId }) {
}
}

export function teardown({ now, registryId}) {
export function teardown({ now, registryId }) {
if (teardownResources) {

const pageSize = 50
Expand Down
18 changes: 9 additions & 9 deletions examples/create-robot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import counter from 'k6/x/counter'
import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()
Expand Down Expand Up @@ -32,15 +32,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
const projectName = `project-${Date.now()}`

harbor.createProject({ projectName })
Expand Down
18 changes: 9 additions & 9 deletions examples/list-artifact-tags.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// List artifact tags in the artifact which has 10K tags

import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'

import { Rate } from 'k6/metrics'

Expand Down Expand Up @@ -41,15 +41,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
const projectName = `project-${Date.now()}`
harbor.createProject({ projectName })

Expand Down
18 changes: 9 additions & 9 deletions examples/list-artifacts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// List artifacts in the repository, will prepare 100K artifacts when PROJECT_NAME or REPOSITORY_NAME env is not set by default

import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'

import { Rate } from 'k6/metrics'

Expand Down Expand Up @@ -42,15 +42,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
let projectName = getEnv('PROJECT_NAME', '')
let repositoryName = getEnv('REPOSITORY_NAME', '')
let preparedInSetup = false
Expand Down
18 changes: 9 additions & 9 deletions examples/list-projects.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// List projects, will prepare 10k projects

import harbor from 'k6/x/harbor'
import { Harbor } from 'k6/x/harbor'
import { Rate } from 'k6/metrics'

const missing = Object()
Expand Down Expand Up @@ -31,15 +31,15 @@ export let options = {
}
};

export function setup() {
harbor.initialize({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})
const harbor = new Harbor({
scheme: getEnv('HARBOR_SCHEME', 'https'),
host: getEnv('HARBOR_HOST'),
username: getEnv('HARBOR_USERNAME', 'admin'),
password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),
insecure: true,
})

export function setup() {
const { total } = harbor.listProjects({ page: 1, pageSize: 1 })

console.log(`total projects: ${total}`)
Expand Down
Loading

0 comments on commit b7f5dda

Please sign in to comment.