mirror of
https://github.com/harness/drone.git
synced 2025-05-31 11:43:15 +00:00
feat: [CDE-502]: add nexus connector support (#3080)
* address feedback * add nexus connector support
This commit is contained in:
parent
e20f4d3ecb
commit
04c6046d70
@ -15,9 +15,10 @@
|
||||
package types
|
||||
|
||||
const (
|
||||
UnknownPlatformConnectorType PlatformConnectorType = "unknown"
|
||||
UnknownPlatformConnectorType PlatformConnectorType = "Unknown"
|
||||
ArtifactoryPlatformConnectorType PlatformConnectorType = "Artifactory"
|
||||
DockerRegistryPlatformConnectorType PlatformConnectorType = "DockerRegistry"
|
||||
NexusPlatformConnectorType PlatformConnectorType = "Nexus"
|
||||
|
||||
UnknownPlatformConnectorAuthType PlatformConnectorAuthType = "unknown"
|
||||
UserNamePasswordPlatformConnectorAuthType PlatformConnectorAuthType = "UsernamePassword"
|
||||
@ -28,6 +29,7 @@ var (
|
||||
platformConnectorTypeMapping = map[string]PlatformConnectorType{
|
||||
ArtifactoryPlatformConnectorType.String(): ArtifactoryPlatformConnectorType,
|
||||
DockerRegistryPlatformConnectorType.String(): DockerRegistryPlatformConnectorType,
|
||||
NexusPlatformConnectorType.String(): NexusPlatformConnectorType,
|
||||
}
|
||||
|
||||
platformConnectorAuthTypeMapping = map[string]PlatformConnectorAuthType{
|
||||
@ -72,8 +74,10 @@ type PlatformConnectorSpec struct {
|
||||
ArtifactoryURL string
|
||||
// DockerRegistryURL is for DockerRegistryPlatformConnectorType
|
||||
DockerRegistryURL string
|
||||
AuthSpec PlatformConnectorAuthSpec
|
||||
EnabledProxy bool
|
||||
// NexusRegistryURL is for NexusPlatformConnectorType
|
||||
NexusRegistryURL string
|
||||
AuthSpec PlatformConnectorAuthSpec
|
||||
EnabledProxy bool
|
||||
}
|
||||
|
||||
// PlatformConnectorAuthSpec provide auth details.
|
||||
@ -94,6 +98,8 @@ func (c PlatformConnectorSpec) ExtractRegistryURL() string {
|
||||
return c.DockerRegistryURL
|
||||
case ArtifactoryPlatformConnectorType:
|
||||
return c.ArtifactoryURL
|
||||
case NexusPlatformConnectorType:
|
||||
return c.NexusRegistryURL
|
||||
case UnknownPlatformConnectorType:
|
||||
return ""
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user