Skip to content

Commit

Permalink
chore: consume icmjobrunner-2.0.0 (#93233)
Browse files Browse the repository at this point in the history
* consuming icmjobrunner:2.0.0
* changes for new JobRunner API
* minor exception handling improvement
* typo fixed
  • Loading branch information
skiesewetter-intershop authored Feb 20, 2024
1 parent afd6029 commit 4abd8b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,6 @@ dependencies {
implementation("org.apache.solr:solr-solrj:9.4.0")
implementation("com.bmuschko.docker-remote-api:com.bmuschko.docker-remote-api.gradle.plugin:9.3.6")
implementation("com.intershop.gradle.icm:icm-gradle-plugin:6.0.0")
implementation("com.intershop.gradle.jobrunner:icmjobrunner:1.0.5")
implementation("com.intershop.gradle.jobrunner:icmjobrunner:2.0.0")
}

Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,16 @@ abstract class AbstractJobRunnerTask @Inject constructor(objectFactory: ObjectFa
Protocol.HTTP
}
val user = User(userName.get(), userPassword.get())
val server = Server(protocolObj, wsUri.host, wsUri.port.toString())
val server = Server(protocolObj, wsUri.host, wsUri.port)

val runner = JobRunner(
server = server,
domain = domain.get(),
srvgroup = servergroup.get(),
srvGroup = servergroup.get(),
user = user,
timeout = maxWait.get(),
logger = project.logger)
logger = project.logger
)

if (sslVerification.get()) {
runner.enableSSLVerification()
Expand All @@ -91,7 +92,7 @@ abstract class AbstractJobRunnerTask @Inject constructor(objectFactory: ObjectFa
try {
jobRunner.triggerJob(jobName)
} catch (ex: JobRunnerException) {
throw GradleException(ex.message ?: "There was a technical problem to run '$jobName'")
throw GradleException(ex.message ?: "There was a technical problem to run '$jobName'", ex)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ abstract class AbstractTaskPreparer(
): TaskProvider<T> where T : CreateExtraContainer {
return project.tasks.register(taskNameOf("create"), taskType) { task ->
task.group = taskGroup
task.description = "Creates the ${getContainerExt()}-container is not already existing"
task.description = "Creates the ${getContainerExt()}-container if not already existing"
task.attachStderr.set(true)
task.attachStdout.set(true)
task.hostConfig.autoRemove.set(true)
Expand Down

0 comments on commit 4abd8b1

Please sign in to comment.