-
Notifications
You must be signed in to change notification settings - Fork 1
feat: pinning version of openssh and sshpass dependencies #11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c4e17e2
feat(ci): add tests for dependency binary versions
GregoryDosh 5cd9616
feat(ci): add tests for dependency binary versions
GregoryDosh 5890e54
fix(ci): update master references to main
GregoryDosh fb2ac59
feat(ci): adding docker publish testing
GregoryDosh a7715d7
fix(ci): remove space between equals and unneeded needs
GregoryDosh 2644c92
fix(ci): update master references to main
GregoryDosh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "os" | ||
|
|
||
| "github.com/sirupsen/logrus" | ||
|
|
@@ -22,8 +23,11 @@ func main() { | |
| Email: "[email protected]", | ||
| }, | ||
| }, | ||
| Action: run, | ||
| Version: openssh.PluginVersion.Semantic(), | ||
| Action: run, | ||
| // The version field looks gross but in practice is really only seen and used in integration tests | ||
| // or when a plugin is misconfigured. We should log the version information of dependent binaries | ||
| // to assist with debugging why a plugin might be failing to operate in a way users expect. | ||
| Version: fmt.Sprintf("Plugin: %s - OpenSSH: %s - SSHPass: %s", openssh.PluginVersion.Semantic(), openssh.OpenSSHVersion, openssh.SSHPassVersion), | ||
| Flags: []cli.Flag{ | ||
| &cli.StringSliceFlag{ | ||
| Name: "source", | ||
|
|
@@ -103,11 +107,13 @@ func run(c *cli.Context) error { | |
| } | ||
|
|
||
| logrus.WithFields(logrus.Fields{ | ||
| "code": "https://github.com/go-vela/vela-openssh", | ||
| "docs": "https://go-vela.github.io/docs/plugins/registry/scp", | ||
| "registry": "https://hub.docker.com/r/target/vela-scp", | ||
| "version": openssh.PluginVersion.Semantic(), | ||
| "commit": openssh.PluginVersion.Metadata.GitCommit, | ||
| "code": "https://github.com/go-vela/vela-openssh", | ||
| "docs": "https://go-vela.github.io/docs/plugins/registry/scp", | ||
| "registry": "https://hub.docker.com/r/target/vela-scp", | ||
| "commit": openssh.PluginVersion.Metadata.GitCommit, | ||
| "version-plugin": openssh.PluginVersion.Semantic(), | ||
| "version-openssh": openssh.OpenSSHVersion, | ||
| "version-sshpass": openssh.SSHPassVersion, | ||
| }).Info("Vela SCP Plugin") | ||
|
|
||
| bp := binarywrapper.Plugin{ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "os" | ||
|
|
||
| "github.com/sirupsen/logrus" | ||
|
|
@@ -22,8 +23,11 @@ func main() { | |
| Email: "[email protected]", | ||
| }, | ||
| }, | ||
| Action: run, | ||
| Version: openssh.PluginVersion.Semantic(), | ||
| Action: run, | ||
| // The version field looks gross but in practice is really only seen and used in integration tests | ||
| // or when a plugin is misconfigured. We should log the version information of dependent binaries | ||
| // to assist with debugging why a plugin might be failing to operate in a way users expect. | ||
| Version: fmt.Sprintf("Plugin: %s - OpenSSH: %s - SSHPass: %s", openssh.PluginVersion.Semantic(), openssh.OpenSSHVersion, openssh.SSHPassVersion), | ||
| Flags: []cli.Flag{ | ||
| &cli.StringFlag{ | ||
| Name: "destination", | ||
|
|
@@ -103,11 +107,13 @@ func run(c *cli.Context) error { | |
| } | ||
|
|
||
| logrus.WithFields(logrus.Fields{ | ||
| "code": "https://github.com/go-vela/vela-openssh", | ||
| "docs": "https://go-vela.github.io/docs/plugins/registry/ssh", | ||
| "registry": "https://hub.docker.com/r/target/vela-ssh", | ||
| "version": openssh.PluginVersion.Semantic(), | ||
| "commit": openssh.PluginVersion.Metadata.GitCommit, | ||
| "code": "https://github.com/go-vela/vela-openssh", | ||
| "docs": "https://go-vela.github.io/docs/plugins/registry/ssh", | ||
| "registry": "https://hub.docker.com/r/target/vela-ssh", | ||
| "commit": openssh.PluginVersion.Metadata.GitCommit, | ||
| "version-plugin": openssh.PluginVersion.Semantic(), | ||
| "version-openssh": openssh.OpenSSHVersion, | ||
| "version-sshpass": openssh.SSHPassVersion, | ||
| }).Info("Vela SSH Plugin") | ||
|
|
||
| bp := binarywrapper.Plugin{ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| BINARY="$1" | ||
|
|
||
| if [ -z "${OPENSSH_VERSION}" ]; then | ||
| printf "OPENSSH_VERSION missing\n" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "${SSHPASS_VERSION}" ]; then | ||
| printf "SSHPASS_VERSION missing\n" | ||
| exit 2 | ||
| fi | ||
|
|
||
| if "/bin/vela-$BINARY" -v | grep unknown; then | ||
| printf "Version information isn't set\n" | ||
| exit 3 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if we can/should combine this with https://docs.renovatebot.com/modules/datasource/#repology-datasource to configure renovate to be aware of the versioning to give us a kick in the butt when there are patches/fixes and such? in the same token, i have never used that setup so not sure how well it works.
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.
Ohhh that's cool, didn't know about that feature. I'll take a look at it tomorrow to see about integrating this. My goal tomorrow/this-week is to get a tagged release and to start I just wanted pinned versions, but something longer term would be like this. So when I merge this PR I'll open a couple of issues to track things like this and the movement away from depending on vela-kaniko for anything.