Skip to content

Commit e8a1de7

Browse files
committed
rename createCosaRemoteSession -> makeCosaRemoteSession
Apparently Codacy/Codenarc has some arbitrary rules about naming functions starting with make/create/build and it doesn't like this function being named create*. Rather than fight it I'll just change the name and move on to something more important. ``` Error: FactoryMethodName A factory method is a method that creates objects, and they are typically named either buildFoo(), makeFoo(), or createFoo(). This rule enforces that only one naming convention is used. It defaults to allowing makeFoo(), but that can be changed using the property regex. ```
1 parent c041f3d commit e8a1de7

4 files changed

+5
-5
lines changed

jobs/build-arch.Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ lock(resource: "build-${params.STREAM}-${basearch}") {
142142
// We set the session to time out after 5h. This essentially
143143
// performs garbage collection on the remote if we fail to clean up.
144144
pipeutils.withPodmanRemoteArchBuilder(arch: basearch) {
145-
def session = pipeutils.createCosaRemoteSession(
145+
def session = pipeutils.makeCosaRemoteSession(
146146
env: container_env,
147147
expiration: "${timeout_mins}m",
148148
image: cosa_img,

jobs/bump-lockfile.Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ lock(resource: "bump-lockfile") {
110110
parallel archinfo.keySet().collectEntries{arch -> [arch, {
111111
if (arch != "x86_64") {
112112
pipeutils.withPodmanRemoteArchBuilder(arch: arch) {
113-
archinfo[arch]['session'] = pipeutils.createCosaRemoteSession(
113+
archinfo[arch]['session'] = pipeutils.makeCosaRemoteSession(
114114
env: container_env,
115115
expiration: "${timeout_mins}m",
116116
image: cosa_img,

jobs/debug-pod.Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ cosaPod(cpu: "${ncpus}",
7676
// We set the session to time out after 4h. This essentially
7777
// performs garbage collection on the remote if we fail to clean up.
7878
pipeutils.withPodmanRemoteArchBuilder(arch: params.ARCH) {
79-
def session = pipeutils.createCosaRemoteSession(
79+
def session = pipeutils.makeCosaRemoteSession(
8080
env: container_env,
8181
expiration: "${params.TIMEOUT}h",
8282
image: cosa_img,

utils.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def bump_builds_json(stream, buildid, arch, s3_stream_dir, acl) {
227227
}
228228
}
229229

230-
// Create a COSA remote session, which is usually used to
230+
// Make a COSA remote session, which is usually used to
231231
// build on a different architecture.
232232
//
233233
// Available parameters:
@@ -236,7 +236,7 @@ def bump_builds_json(stream, buildid, arch, s3_stream_dir, acl) {
236236
// long the container should last (i.e. 4h, 30m)
237237
// image: string that represents the container image to pull
238238
// workdir: string that represents the in container working directory
239-
def createCosaRemoteSession(params = [:]) {
239+
def makeCosaRemoteSession(params = [:]) {
240240
def expiration = params['expiration']
241241
def image = params['image']
242242
def workdir = params['workdir']

0 commit comments

Comments
 (0)