feature: names refactoring, Jenkinsfile edit, example edit, bug fixes
This commit is contained in:
@@ -18,9 +18,20 @@ class DockerLogin {
|
||||
|
||||
// Логинимся в Registry
|
||||
ScriptLog.printf "Performing login to registry..."
|
||||
def registryName = System.getGlobalProperty("ci.docker.registry")
|
||||
def registryUser = System.getGlobalProperty("ci.docker.registry.username")
|
||||
def registryPassword = System.getGlobalProperty("ci.docker.registry.password")
|
||||
|
||||
def registryName = CIProperties.getProperty("docker.registry")
|
||||
def registryUser = CIProperties.getProperty("docker.registry.username")
|
||||
def registryPassword = CIProperties.getProperty("docker.registry.password")
|
||||
|
||||
if (registryName.isNullOrBlank()) {
|
||||
throw new IllegalStateException("Docker registry name not set")
|
||||
}
|
||||
if (registryUser.isNullOrBlank()) {
|
||||
throw new IllegalStateException("Docker registry user not set")
|
||||
}
|
||||
if (registryPassword.isNullOrBlank()) {
|
||||
throw new IllegalStateException("Docker registry password not set")
|
||||
}
|
||||
|
||||
sh "docker login $registryName -u $registryUser -p $registryPassword"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user