corrected how environment variables are read
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
def call(String dockerRepo, String imageName, String dockerfilePath, String buildContext, String nexusUser, String nexusPass) {
|
||||
def call(String imageName, String dockerfilePath, String buildContext, String nexusUser) {
|
||||
def dockerRepo = env.NEXUS_DOCKER_URL
|
||||
def nexusPass = env.NEXUS_DOCKER_PASS
|
||||
|
||||
container('docker') {
|
||||
sh "dockerd --insecure-registry http://$NEXUS_DOCKER_URL &"
|
||||
sh "dockerd --insecure-registry http://${dockerRepo} &"
|
||||
echo "Started Docker daemon"
|
||||
sh "docker build -t ${imageName} -f ${dockerfilePath} ${buildContext}"
|
||||
echo "Docker image ${imageName} built"
|
||||
|
||||
Reference in New Issue
Block a user