-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add new feature which prints information about new plugins which can be upgraded to #611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed when I try to compile this PR:
codespace ➜ /workspaces/jenkins-cli (pr/wxharry/610) $ gh pr checkout 611
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 36 (delta 26), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (36/36), 8.79 KiB | 817.00 KiB/s, done.
From https://github.com/jenkins-zh/jenkins-cli
* [new ref] refs/pull/611/head -> plugincenter
Switched to branch 'plugincenter'
codespace ➜ /workspaces/jenkins-cli (plugincenter) $ make
go fmt ./util/...
go: github.com/creack/pty@v1.1.11: missing go.sum entry; to add it:
go mod download github.com/creack/pty
make: *** [Makefile:108: fmt] Error 1
Still failed when I added the missing go.sum entry:
codespace ➜ /workspaces/jenkins-cli (plugincenter) $ go mod download github.com/creack/pty
codespace ➜ /workspaces/jenkins-cli (plugincenter ✗) $ make
go fmt ./util/...
go fmt ./client/...
go: downloading github.com/linuxsuren/http-downloader v0.0.22
go fmt ./app/...
go: downloading golang.org/x/text v0.3.5
go: downloading github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd
go: downloading github.com/xanzy/ssh-agent v0.2.1
go: downloading github.com/sergi/go-diff v1.0.0
gofmt -s -w .
go vet ./...
go: downloading github.com/onsi/ginkgo v1.15.1
go: downloading github.com/onsi/gomega v1.11.0
app/cmd/plugin_center.go:9:2: missing go.sum entry for module providing package github.com/jedib0t/go-pretty/v6/table (imported by github.com/jenkins-zh/jenkins-cli/app/cmd); to add:
go get github.com/jenkins-zh/jenkins-cli/app/cmd
/go/pkg/mod/github.com/google/go-github/v29@v29.0.3/github/git_commits.go:16:2: missing go.sum entry for module providing package golang.org/x/crypto/openpgp (imported by github.com/google/go-github/v29/github); to add:
go get github.com/google/go-github/v29/github@v29.0.3
/go/pkg/mod/github.com/linuxsuren/go-cli-plugin@v0.0.4/pkg/cmd/fetch.go:7:2: missing go.sum entry for module providing package golang.org/x/crypto/ssh (imported by github.com/linuxsuren/go-cli-plugin/pkg/cmd); to add:
go get github.com/linuxsuren/go-cli-plugin/pkg/cmd@v0.0.4
/go/pkg/mod/github.com/xanzy/ssh-agent@v0.2.1/sshagent.go:27:2: missing go.sum entry for module providing package golang.org/x/crypto/ssh/agent (imported by github.com/xanzy/ssh-agent); to add:
go get github.com/xanzy/ssh-agent@v0.2.1
/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/transport/ssh/auth_method.go:18:2: missing go.sum entry for module providing package golang.org/x/crypto/ssh/knownhosts (imported by gopkg.in/src-d/go-git.v4/plumbing/transport/ssh); to add:
go get gopkg.in/src-d/go-git.v4/plumbing/transport/ssh@v4.13.1
/go/pkg/mod/github.com/jbenet/go-context@v0.0.0-20150711004518-d14ea06fba99/io/ctxio.go:16:2: missing go.sum entry for module providing package golang.org/x/net/context (imported by github.com/jenkins-zh/jenkins-cli/app/cmd); to add:
go get github.com/jenkins-zh/jenkins-cli/app/cmd
/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/transport/ssh/common.go:15:2: missing go.sum entry for module providing package golang.org/x/net/proxy (imported by gopkg.in/src-d/go-git.v4/plumbing/transport/ssh); to add:
go get gopkg.in/src-d/go-git.v4/plumbing/transport/ssh@v4.13.1
/go/pkg/mod/github.com/mattn/go-isatty@v0.0.12/isatty_tcgets.go:6:8: missing go.sum entry for module providing package golang.org/x/sys/unix (imported by golang.org/x/term); to add:
go get golang.org/x/term@v0.0.0-20210503060354-a79de5458b56
make: *** [Makefile:97: vet] Error 1
It works well when I try to run these commands:
codespace ➜ /workspaces/jenkins-cli (plugincenter ✗) $ go mod tidy
go: downloading github.com/jedib0t/go-pretty/v6 v6.2.3
go: downloading golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
go: downloading golang.org/x/lint v0.0.0-20200302205851-738671d3881b
go: downloading honnef.co/go/tools v0.0.1-2020.1.3
go: downloading gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
go: downloading golang.org/x/tools v0.0.0-20210106214847-113979e3529a
go: downloading github.com/google/go-cmp v0.5.4
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/kr/text v0.1.0
go: downloading github.com/golang/protobuf v1.4.3
go: downloading google.golang.org/protobuf v1.25.0
codespace ➜ /workspaces/jenkins-cli (plugincenter ✗) $ make
go fmt ./util/...
go fmt ./client/...
go fmt ./app/...
gofmt -s -w .
go vet ./...
export GO111MODULE=on
export GOPROXY=https://goproxy.io
go mod tidy
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/linuxsuren/cobra-extension/version.version=dev-v0.0.37 -X github.com/linuxsuren/cobra-extension/version.commit=6474f76 -X github.com/linuxsuren/cobra-extension/version.date=2021-08-15" -o bin/linux/jcli main.go
chmod +x bin/linux/jcli
rm -rf jcli && ln -s bin/linux/jcli jcli
All right. I am gonna fix this. |
go.mod
Outdated
@@ -1,6 +1,6 @@ | |||
module github.com/jenkins-zh/jenkins-cli | |||
|
|||
go 1.16 | |||
go 1.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you change the go version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I've changed it back.
Codecov Report
@@ Coverage Diff @@
## master #611 +/- ##
=======================================
Coverage 37.98% 37.98%
=======================================
Files 13 13
Lines 416 416
=======================================
Hits 158 158
Misses 246 246
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
hi @jxr98 Please pay attention to the conflicts. |
a577203
to
aaa9027
Compare
Hi @LinuxSuRen, I've solved the conflicts. By the way, any problem with this pr? |
To use this new feature, a plugin called 'pipeline restful api' needs to be installed in jenkins. I've tested using the command './jcli plugin center'. It's a bit slow because the function is going to check every installed plugins in 'https://plugins.jenkins.io/api/plugin/'. The function only prints information about plugins which have newer versions then the installed. |
Hello Rick. This pr is the second needed to be reviewed. |
Make sure that you've checked the boxes below before you submit PR:
Always
For the bug fixes or features only