You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeStreams.stdout(chalk`{yellow WARNING: ${path}: no matching files. Ensure that the artifact path is relative to the working directory}\n`);
1238
+
continue;
1239
+
}
1240
+
1241
+
if(!globby.hasMagic(path))numOfFiles++;// add one because the pattern itself is a folder
1242
+
1243
+
writeStreams.stdout(`${_path}: found ${numOfFiles} artifact files and directories\n`);
1203
1244
}
1245
+
writeStreams.stdout(chalk`${this.formattedJobName} {magentaBright cache created in '${stateDir}/cache/${cacheName}'} in {magenta ${prettyHrtime(endTime)}}\n`);
awaitfs.rm(`${cwd}/.gitlab-ci-local/cache/`,{recursive: true,force: true});// to ensure that the cache from previous runs gets deleted
20
+
21
+
awaithandler({
22
+
cwd,
23
+
noColor: true,
24
+
file: ".gitlab-ci.yml",
25
+
},writeStreams);
26
+
});
27
+
28
+
it("should show export cache message",()=>{
29
+
expect(writeStreams.stdoutLines.join("\n")).toContain("produce-cache cache created in '.gitlab-ci-local/cache/maven'");
30
+
});
31
+
32
+
it("should show the correct number of files that's exported",()=>{
33
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache: found 4 artifact files and directories");
34
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache/: found 4 artifact files and directories");
35
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache/*: found 3 artifact files and directories");
36
+
// NOTE: gitlab.com shows .cache/**: found 7 matching artifact files and directories
37
+
// i can't make any sense of it, i think it's probably a bug?
38
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache/**: found 3 artifact files and directories");
39
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache2/*/bar: found 4 artifact files and directories");
40
+
expect(writeStreams.stdoutLines.join("\n")).toContain(".cache2/**/bar: found 4 artifact files and directories");
41
+
expect(writeStreams.stdoutLines.join("\n")).toContain("WARNING: .cache3: no matching files. Ensure that the artifact path is relative to the working directory");
42
+
expect(writeStreams.stdoutLines.join("\n")).toContain("WARNING: processPath: artifact path is not a subpath of project directory: /tmp");
constexpected="cache-key-file referencing $CI_PROJECT_DIR cache created in '.gitlab-ci-local/cache/0_/builds/gcl/test-project/fakepackage-8aaa60c7b3009df8ce6973111af131bbcde5636e'";
0 commit comments