[build]: allow to customize USERNAME and PASSWORD in command line (#492)
* [build]: allow to customize USERNAME and PASSWORD in command line * use default password and username if not specified in the command line
This commit is contained in:
parent
5585221890
commit
2e9b92e1c1
2
Makefile
2
Makefile
@ -39,6 +39,8 @@ DOCKER_BUILD = docker build --no-cache \
|
|||||||
PLATFORM=$(PLATFORM) \
|
PLATFORM=$(PLATFORM) \
|
||||||
BUILD_NUMBER=$(BUILD_NUMBER) \
|
BUILD_NUMBER=$(BUILD_NUMBER) \
|
||||||
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
|
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
|
||||||
|
PASSWORD=$(PASSWORD) \
|
||||||
|
USERNAME=$(USERNAME) \
|
||||||
$@
|
$@
|
||||||
|
|
||||||
sonic-slave-build :
|
sonic-slave-build :
|
||||||
|
@ -26,11 +26,11 @@ SONIC_CONFIG_LOG_TO_FILES = y
|
|||||||
# Comment next line to disable:
|
# Comment next line to disable:
|
||||||
# SONIC_CONFIG_ENABLE_COLORS = y
|
# SONIC_CONFIG_ENABLE_COLORS = y
|
||||||
|
|
||||||
# USERNAME - username for installer build
|
# DEFAULT_USERNAME - default username for installer build
|
||||||
USERNAME = admin
|
DEFAULT_USERNAME = admin
|
||||||
|
|
||||||
# PASSWORD - password for installer build
|
# DEFAULT_PASSWORD - default password for installer build
|
||||||
PASSWORD = YourPaSsWoRd
|
DEFAULT_PASSWORD = YourPaSsWoRd
|
||||||
|
|
||||||
# ENABLE_DHCP_GRAPH_SERVICE - specify the source of minigraph to generate configuration file.
|
# ENABLE_DHCP_GRAPH_SERVICE - specify the source of minigraph to generate configuration file.
|
||||||
# If set to y SONiC will get the minigraph from graph service. Graph service URL need to be
|
# If set to y SONiC will get the minigraph from graph service. Graph service URL need to be
|
||||||
|
8
slave.mk
8
slave.mk
@ -59,6 +59,14 @@ ifneq ($(CONFIGURED_PLATFORM), undefined)
|
|||||||
include $(PLATFORM_PATH)/rules.mk
|
include $(PLATFORM_PATH)/rules.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USERNAME),)
|
||||||
|
override USERNAME := $(DEFAULT_USERNAME)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PASSWORD),)
|
||||||
|
override PASSWORD := $(DEFAULT_PASSWORD)
|
||||||
|
endif
|
||||||
|
|
||||||
MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS)
|
MAKEFLAGS += -j $(SONIC_CONFIG_BUILD_JOBS)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user