(writeStreams: WriteStreams, expanded: {[key: string]: string})
| 861 | } |
| 862 | |
| 863 | private async mountCacheCmd (writeStreams: WriteStreams, expanded: {[key: string]: string}) { |
| 864 | if (this.imageName(expanded) && !this.argv.mountCache) return []; |
| 865 | |
| 866 | const cmd: string[] = []; |
| 867 | for (const [index, c] of this.cache.entries()) { |
| 868 | const uniqueCacheName = await this.getUniqueCacheName(this.argv.cwd, expanded, index); |
| 869 | c.paths.forEach((p) => { |
| 870 | const path = Utils.expandText(p, expanded); |
| 871 | writeStreams.stdout(chalk`${this.formattedJobName} {magentaBright mounting cache} for path ${path}\n`); |
| 872 | const cacheMount = Utils.safeDockerString(`gcl-${expanded.CI_PROJECT_PATH_SLUG}-${uniqueCacheName}`); |
| 873 | cmd.push("-v", `${cacheMount}:${this.ciProjectDir}/${path}`); |
| 874 | }); |
| 875 | } |
| 876 | return cmd; |
| 877 | } |
| 878 | |
| 879 | private async execPreScripts (expanded: {[key: string]: string}): Promise<void> { |
| 880 | const prescripts = this.beforeScripts.concat(this.scripts); |
no test coverage detected