Never gonna tell a lie and hurt you

This commit is contained in:
2025-05-27 14:00:02 +03:00
parent f3d59e489e
commit bd4a1cde3e
2 changed files with 4 additions and 3 deletions

View File

@@ -4,9 +4,9 @@ class DockerBuilder {
def getDockerdCommand(String dockerRepo, Boolean useInsecureRegistry) {
return useInsecureRegistry ? "dockerd --insecure-registry http://${dockerRepo} &" : "dockerd &"
}
def getDockerBuildCommands(String dockerRepo, String imageName, String dockerfilePath, String buildContext, String nexusUser, String nexusPass) {
def getDockerBuildCommands(String dockerRepo, String imageName, String dockerfilePath, String buildContext, String nexusUser, String nexusPass, Integer appPort) {
return [
"docker build -t ${imageName} -f ${dockerfilePath} ${buildContext}",
"docker build --build-arg APP_PORT=${appPort} -t ${imageName} -f ${dockerfilePath} ${buildContext}",
"docker login http://${dockerRepo} -u ${nexusUser} -p ${nexusPass}",
"docker tag ${imageName} ${dockerRepo}/my-docker-repo/${imageName}:latest",
"docker push ${dockerRepo}/my-docker-repo/${imageName}:latest"

View File

@@ -29,7 +29,8 @@ def call(String appName, String helmChartPath, String helmRepoName,String helmCh
"./Dockerfile",
"target",
"admin",
env.NEXUS_DOCKER_PASS
env.NEXUS_DOCKER_PASS,
appPort
).each { cmd ->
sh(script: cmd, returnStdout:true)
}