Skip to content

Commit c137727

Browse files
committedMar 14, 2019
Some documentation & licensing
1 parent 3cc87d7 commit c137727

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed
 

‎LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2019 Loren Segal
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

‎README.md

+5
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ Your configuration might look something like this:
6161
And that's it, you're all set to trigger new builds on AWS CodeBuild!
6262

6363
[awscli]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
64+
65+
## License
66+
67+
This project © 2019 by [Loren Segal](mailto:lsegal@soen.ca) and is
68+
licensed under the MIT license.

‎src/main/java/dev/lsegal/jenkins/codebuilder/CodeBuilderAgent.java

+7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,20 @@ class CodeBuilderAgent extends AbstractCloudSlave {
2424
private static final long serialVersionUID = -6722929807051421839L;
2525
private final CodeBuilderCloud cloud;
2626

27+
/**
28+
* Creates a new CodeBuilderAgent node that provisions a
29+
* {@link CodeBuilderComputer}.
30+
*/
2731
public CodeBuilderAgent(@Nonnull CodeBuilderCloud cloud, @Nonnull String name, @Nonnull ComputerLauncher launcher)
2832
throws Descriptor.FormException, IOException {
2933
super(name, "AWS CodeBuild Agent", "/build", 1, Mode.NORMAL, cloud.getLabel(), launcher,
3034
new CloudRetentionStrategy(cloud.getAgentTimeout() / 60 + 1), Collections.emptyList());
3135
this.cloud = cloud;
3236
}
3337

38+
/**
39+
* Get the cloud instance associated with this builder
40+
*/
3441
public CodeBuilderCloud getCloud() {
3542
return cloud;
3643
}

‎src/main/java/dev/lsegal/jenkins/codebuilder/CodeBuilderCloud.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
import jenkins.model.Jenkins;
4747
import jenkins.model.JenkinsLocationConfiguration;
4848

49+
/**
50+
* This is the root class that contains all configuration state about the
51+
* CodeBuilder cloud agents. Jenkins calls {@link CodeBuilderCloud.provision} on
52+
* this class to create new nodes.
53+
*/
4954
public class CodeBuilderCloud extends Cloud {
5055
private static final Logger LOGGER = LoggerFactory.getLogger(CodeBuilderCloud.class);
5156
private static final String DEFAULT_JNLP_IMAGE = "lsegal/jnlp-docker-agent:latest";
@@ -124,7 +129,7 @@ public String getProjectName() {
124129
public String getRegion() {
125130
return region;
126131
}
127-
132+
128133
@Nonnull
129134
public String getLabel() {
130135
return StringUtils.isBlank(label) ? "" : label;

0 commit comments

Comments
 (0)
Please sign in to comment.