Skip to content

Commit 1073537

Browse files
committed
_Shared library_ is redundant; simplifying naming
1 parent e36f40b commit 1073537

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Pipeline Shared Libraries
1+
# Pipeline Groovy Libraries
22

33
When you have multiple Pipeline jobs, you often want to share some parts of the Pipeline scripts between them to keep Pipeline scripts [DRY](http://en.wikipedia.org/wiki/Don't_repeat_yourself).
44
A very common use case is that you have many projects that are built in the similar way.
55

6-
This plugin adds that functionality by allowing you to create “shared library script” SCM repositories.
6+
This plugin adds that functionality by allowing you to create “library script” SCM repositories.
77
You may define libraries hosted by any SCM in a location of your choice.
88

99
Comprehensive user documentation can be found [in the Pipeline chapter of the User Handbook](https://jenkins.io/doc/book/pipeline/shared-libraries/).

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<artifactId>pipeline-groovy-lib</artifactId>
3636
<version>${changelist}</version>
3737
<packaging>hpi</packaging>
38-
<name>Pipeline: Shared Groovy Libraries</name>
38+
<name>Pipeline: Groovy Libraries</name>
3939
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
4040
<licenses>
4141
<license>

src/main/java/org/jenkinsci/plugins/workflow/libs/LibraryStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public DescriptorImpl() {
126126
}
127127

128128
@Override public String getDisplayName() {
129-
return "Load a shared library on the fly";
129+
return "Load a library on the fly";
130130
}
131131

132132
@Restricted(DoNotUse.class) // Jelly

src/main/java/org/jenkinsci/plugins/workflow/libs/ResourceStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public DescriptorImpl() {
7474
}
7575

7676
@Override public String getDisplayName() {
77-
return "Load a resource file from a shared library";
77+
return "Load a resource file from a library";
7878
}
7979

8080
@Override public String getFunctionName() {

src/main/java/org/jenkinsci/plugins/workflow/libs/SCMSourceRetriever.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static void doRetrieve(String name, boolean changelog, @NonNull SCM scm, String
208208
}
209209
String excludes = INCLUDE_SRC_TEST_IN_LIBRARIES ? null : "src/test/";
210210
if (lease.path.child(libraryPath).child("src/test").exists()) {
211-
listener.getLogger().println("Excluding src/test/ from checkout of " + scm.getKey() + " so that shared library test code cannot be accessed by Pipelines.");
211+
listener.getLogger().println("Excluding src/test/ from checkout of " + scm.getKey() + " so that library test code cannot be accessed by Pipelines.");
212212
listener.getLogger().println("To remove this log message, move the test code outside of src/. To restore the previous behavior that allowed access to files in src/test/, pass -D" + SCMSourceRetriever.class.getName() + ".INCLUDE_SRC_TEST_IN_LIBRARIES=true to the java command used to start Jenkins.");
213213
}
214214
// Cannot add WorkspaceActionImpl to private CpsFlowExecution.flowStartNodeActions; do we care?
@@ -335,14 +335,14 @@ private static void deleteLibsDir(Item item, String itemFullName) {
335335
if (dir.isDirectory()) {
336336
LOGGER.log(
337337
Level.INFO,
338-
() -> "Deleting obsolete shared library workspace " + dir);
338+
() -> "Deleting obsolete library workspace " + dir);
339339
dir.deleteRecursive();
340340
}
341341
} catch (IOException | InterruptedException e) {
342342
LOGGER.log(
343343
Level.WARNING,
344344
e,
345-
() -> "Could not delete obsolete shared library workspace " + dir);
345+
() -> "Could not delete obsolete library workspace " + dir);
346346
}
347347
}
348348
}

src/main/resources/index.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?jelly escape-by-default='true'?>
22
<div>
3-
Shared libraries for Pipeline scripts.
3+
Libraries for Pipeline scripts allowing logic to be shared across jobs.
44
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
Whether to include any changes in the shared library
2+
Whether to include any changes in the library
33
in the recent changes of jobs using the library.
44
Defaults to including the changes.
55
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div>
2-
Relative (<code>/</code>-separated) path to a resource in a shared library's <code>/resources</code> folder.
2+
Relative (<code>/</code>-separated) path to a resource in a library's <code>/resources</code> folder.
33
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div>
2-
Reads a resource from a shared library and returns its content as a plain string.
2+
Reads a resource from a library and returns its content as a plain string.
33
</div>

src/test/java/org/jenkinsci/plugins/workflow/libs/LibraryAdderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public class LibraryAdderTest {
187187
}
188188
sampleRepo.write("vars/myecho.groovy", "def call() {echo 'something even more special'}");
189189
sampleRepo.git("add", "vars");
190-
sampleRepo.git("commit", "--message=shared_library_commit");
190+
sampleRepo.git("commit", "--message=library_commit");
191191
try (WorkspaceList.Lease lease = r.jenkins.toComputer().getWorkspaceList().acquire(base)) {
192192
WorkflowRun b = r.buildAndAssertSuccess(p);
193193
List<ChangeLogSet<? extends ChangeLogSet.Entry>> changeSets = b.getChangeSets();
@@ -197,7 +197,7 @@ public class LibraryAdderTest {
197197
assertEquals("git", changeSet.getKind());
198198
Iterator<? extends ChangeLogSet.Entry> iterator = changeSet.iterator();
199199
ChangeLogSet.Entry entry = iterator.next();
200-
assertEquals("shared_library_commit", entry.getMsg() );
200+
assertEquals("library_commit", entry.getMsg() );
201201
r.assertLogContains("something even more special", b);
202202
}
203203
}
@@ -219,7 +219,7 @@ public class LibraryAdderTest {
219219
}
220220
sampleRepo.write("vars/myecho.groovy", "def call() {echo 'something even more special'}");
221221
sampleRepo.git("add", "vars");
222-
sampleRepo.git("commit", "--message=shared_library_commit");
222+
sampleRepo.git("commit", "--message=library_commit");
223223
try (WorkspaceList.Lease lease = r.jenkins.toComputer().getWorkspaceList().acquire(base)) {
224224
WorkflowRun b = r.buildAndAssertSuccess(p);
225225
List<ChangeLogSet<? extends ChangeLogSet.Entry>> changeSets = b.getChangeSets();

0 commit comments

Comments
 (0)