Check if Dockerhub environment exists before using gopass
This commit is contained in:
parent
742fe2e641
commit
2233676fdd
1 changed files with 6 additions and 2 deletions
|
@ -15,8 +15,12 @@ class MyBuild(DevopsDockerBuild):
|
||||||
def initialize(project):
|
def initialize(project):
|
||||||
project.build_depends_on('ddadevops>=0.6.1')
|
project.build_depends_on('ddadevops>=0.6.1')
|
||||||
stage = 'notused'
|
stage = 'notused'
|
||||||
dockerhub_user = environ.get('DOCKERHUB_USER', gopass_field_from_path('meissa/web/docker.com', 'login'))
|
dockerhub_user = environ.get('DOCKERHUB_USER')
|
||||||
dockerhub_password = environ.get('DOCKERHUB_PASSWORD', gopass_password_from_path('meissa/web/docker.com'))
|
if not dockerhub_user:
|
||||||
|
dockerhub_user = gopass_field_from_path('meissa/web/docker.com', 'login')
|
||||||
|
dockerhub_password = environ.get('DOCKERHUB_PASSWORD')
|
||||||
|
if not dockerhub_password:
|
||||||
|
dockerhub_password = gopass_password_from_path('meissa/web/docker.com')
|
||||||
config = create_devops_docker_build_config(
|
config = create_devops_docker_build_config(
|
||||||
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
|
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
|
||||||
build = MyBuild(project, config)
|
build = MyBuild(project, config)
|
||||||
|
|
Loading…
Reference in a new issue