Class ExecTask
- All Implemented Interfaces:
Configurable
,KeyVal.Mixin
,UtilsMixin
Runtime.exec(String[])
system call.
/*
* Copyright 2022 Thoughtworks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
exec {
commandLine = ["curl", "https://gocd.example.com/go/api/version", "-H'Accept: application/vnd.go.cd.v1+json'"]
workingDir = "foo"
}
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The command line to be executed.The directory in which the script or command is to be executed.int
hashCode()
void
setCommandLine
(List<String> commandLine) The command line to be executed.void
setWorkingDir
(String workingDir) The directory in which the script or command is to be executed.toString()
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.Configurable
configure
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.KeyVal.Mixin
lookup, lookup
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.UtilsMixin
sanitizeName
-
Constructor Details
-
ExecTask
public ExecTask() -
ExecTask
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getWorkingDir
The directory in which the script or command is to be executed.Note that this directory is relative to the directory where the agent checks out the materials.
-
getCommandLine
The command line to be executed. -
setWorkingDir
The directory in which the script or command is to be executed.Note that this directory is relative to the directory where the agent checks out the materials.
-
setCommandLine
The command line to be executed. -
toString
-