diff --git a/jenkins/docker-compose.yaml b/jenkins/docker-compose.yaml index 06d37b2..015d008 100644 --- a/jenkins/docker-compose.yaml +++ b/jenkins/docker-compose.yaml @@ -5,8 +5,8 @@ services: privileged: true user: root ports: - - 8081:8080 - - 50000:50000 + - "8081:8080" + - "50000:50000" container_name: jenkins volumes: - ~/jenkins:/var/jenkins_home diff --git a/test/groovy/util/Result.groovy b/test/groovy/util/Result.groovy index c7db8d9..b3ad2d2 100644 --- a/test/groovy/util/Result.groovy +++ b/test/groovy/util/Result.groovy @@ -5,9 +5,9 @@ class Result { def actions = [] int status - def Result() {} + Result() {} - def int status() { + int status() { return status } } \ No newline at end of file diff --git a/test/groovy/vars/KustomizeTest.groovy b/test/groovy/vars/KustomizeTest.groovy index f6f68d1..c3f184d 100644 --- a/test/groovy/vars/KustomizeTest.groovy +++ b/test/groovy/vars/KustomizeTest.groovy @@ -1,7 +1,7 @@ package groovy.vars import static com.lesfurets.jenkins.unit.MethodCall.callArgsToString -import static org.assertj.core.api.Assertions.*; +import static org.assertj.core.api.Assertions.* import com.lesfurets.jenkins.unit.BasePipelineTest import org.junit.Before @@ -9,7 +9,7 @@ import org.junit.Test class KustomizeTest extends BasePipelineTest { - Script kustomize; + Script kustomize @Before @Override diff --git a/vars/cleanBuilds.groovy b/vars/cleanBuilds.groovy index e91e4a4..640c812 100644 --- a/vars/cleanBuilds.groovy +++ b/vars/cleanBuilds.groovy @@ -5,7 +5,7 @@ import com.jenkinsci.plugins.badge.action.BadgeAction // the function implements how many build per environment should be kept // parameter is maxKeepBuilds def call(Map args) { - def maxNumberToKeepBuilds = args?.maxKeepBuilds ?: 10; + def maxNumberToKeepBuilds = args?.maxKeepBuilds ?: 10 def environmentBuildCount = [:] Jenkins.instance.getItemByFullName(args.job) diff --git a/vars/openshiftUtils.groovy b/vars/openshiftUtils.groovy index fae1d81..c231080 100644 --- a/vars/openshiftUtils.groovy +++ b/vars/openshiftUtils.groovy @@ -10,7 +10,7 @@ // credentialsId -> credentials for the OpenShift login // namespace -> true adds NAMESPACE_NAME param // -def void applyTemplate(String ocpUrl, String ocpProject, String templateFile, String credentialsId, boolean namespace) { +void applyTemplate(String ocpUrl, String ocpProject, String templateFile, String credentialsId, boolean namespace) { echo "-- start resource update by template --" echo "OpenShift server URL: $ocpUrl" @@ -47,7 +47,7 @@ def void applyTemplate(String ocpUrl, String ocpProject, String templateFile, St // envFile -> environment file // namespace -> true adds NAMESPACE_NAME param // -def void applyTemplateWithEnvFile(String ocpUrl, String ocpProject, String templateFile, String credentialsId, String envFile, boolean namespace) { +void applyTemplateWithEnvFile(String ocpUrl, String ocpProject, String templateFile, String credentialsId, String envFile, boolean namespace) { echo "-- start resource update by template with environment file --" echo "OpenShift server URL: $ocpUrl"