Skip to content

Commit

Permalink
Fix some code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Jul 10, 2024
1 parent 3f3a412 commit 7a5eb90
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions jenkins/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/groovy/util/Result.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class Result {
def actions = []
int status

def Result() {}
Result() {}

def int status() {
int status() {
return status
}
}
4 changes: 2 additions & 2 deletions test/groovy/vars/KustomizeTest.groovy
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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
import org.junit.Test

class KustomizeTest extends BasePipelineTest {

Script kustomize;
Script kustomize

@Before
@Override
Expand Down
2 changes: 1 addition & 1 deletion vars/cleanBuilds.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions vars/openshiftUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 7a5eb90

Please sign in to comment.