Class Tasks
- All Implemented Interfaces:
Configurable
,KeyVal.Mixin
,UtilsMixin
,Iterable<Task>
,Collection<Task>
,List<Task>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvenience forexec(Closure)
task that wraps a command in abash
shell.boolean
Creates an `exec` task.fetchArtifact
(Closure cl) int
hashCode()
Convenience forexec(Closure)
task that wraps a command in a shell.Convenience forexec(Closure)
task that wraps a command in azsh
shell.Methods inherited from class cd.go.contrib.plugins.configrepo.groovy.dsl.CollectionNode
add, add, addAll, addAll, clear, contains, containsAll, create, get, getNames, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
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 java.util.List
replaceAll, sort, spliterator
Methods inherited from interface cd.go.contrib.plugins.configrepo.groovy.dsl.mixins.UtilsMixin
sanitizeName
-
Constructor Details
-
Tasks
public Tasks()
-
-
Method Details
-
exec
Creates an `exec` task. -
shell
Convenience forexec(Closure)
task that wraps a command in a shell./*
* 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.
*/
tasks {
// for simple evaluation of environment variables
// equivalent of `bash -c 'rsync file user@${REMOTE_HOST}:'`
bash {
commandString = 'rsync file user@${REMOTE_HOST}:'
}
// to explicitly call a shell script using `bash deploy.sh`
bash {
file = "./deploy.sh"
}
// to load up `.profile` or equivalent. This is particularly useful if you're using shell shims like `rvm` or `nvm`
bash {
login = true
// you can also invoke the following method:
loadProfile()
}
// if you want to use a custom shell
shell {
shell = '/bin/fish'
file = './deploy.sh'
}
}
-
bash
Convenience forexec(Closure)
task that wraps a command in abash
shell./*
* 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.
*/
tasks {
// for simple evaluation of environment variables
// equivalent of `bash -c 'rsync file user@${REMOTE_HOST}:'`
bash {
commandString = 'rsync file user@${REMOTE_HOST}:'
}
// to explicitly call a shell script using `bash deploy.sh`
bash {
file = "./deploy.sh"
}
// to load up `.profile` or equivalent. This is particularly useful if you're using shell shims like `rvm` or `nvm`
bash {
login = true
// you can also invoke the following method:
loadProfile()
}
// if you want to use a custom shell
shell {
shell = '/bin/fish'
file = './deploy.sh'
}
}
-
zsh
Convenience forexec(Closure)
task that wraps a command in azsh
shell./*
* 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.
*/
tasks {
// for simple evaluation of environment variables
// equivalent of `bash -c 'rsync file user@${REMOTE_HOST}:'`
bash {
commandString = 'rsync file user@${REMOTE_HOST}:'
}
// to explicitly call a shell script using `bash deploy.sh`
bash {
file = "./deploy.sh"
}
// to load up `.profile` or equivalent. This is particularly useful if you're using shell shims like `rvm` or `nvm`
bash {
login = true
// you can also invoke the following method:
loadProfile()
}
// if you want to use a custom shell
shell {
shell = '/bin/fish'
file = './deploy.sh'
}
}
-
fetchArtifact
public FetchArtifactTask fetchArtifact(@DelegatesTo(value=FetchArtifactTask.class,strategy=3) Closure cl) -
fetchExternalArtifact
public FetchExternalArtifactTask fetchExternalArtifact(@DelegatesTo(value=FetchExternalArtifactTask.class,strategy=3) Closure cl) -
fetchFile
public FetchArtifactTask fetchFile(@DelegatesTo(value=FetchArtifactTask.class,strategy=3) Closure cl) -
fetchDirectory
public FetchArtifactTask fetchDirectory(@DelegatesTo(value=FetchArtifactTask.class,strategy=3) Closure cl) -
plugin
-
equals
- Specified by:
equals
in interfaceCollection<Task>
- Specified by:
equals
in interfaceList<Task>
- Overrides:
equals
in classCollectionNode<Task>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Task>
- Specified by:
hashCode
in interfaceList<Task>
- Overrides:
hashCode
in classCollectionNode<Task>
-