build
This commit is contained in:
parent
8883487425
commit
ef78fd9c8a
7 changed files with 82000 additions and 5 deletions
25
dist/post/index.js
vendored
25
dist/post/index.js
vendored
|
|
@ -157,6 +157,11 @@ module.exports = {
|
|||
name: 'repository',
|
||||
paths: [bazelRepository]
|
||||
},
|
||||
remoteCacheServer: {
|
||||
enabled: true,
|
||||
url: 'http://localhost:8080/cache',
|
||||
logPath: `${os.tmpdir()}/remote-cache-server.log`,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -95935,11 +95940,31 @@ const core = __nccwpck_require__(2186)
|
|||
const glob = __nccwpck_require__(8090)
|
||||
const config = __nccwpck_require__(5532)
|
||||
const { getFolderSize } = __nccwpck_require__(4962)
|
||||
const { execSync } = __nccwpck_require__(2081)
|
||||
|
||||
async function run() {
|
||||
await stopRemoteCacheServer()
|
||||
await saveCaches()
|
||||
}
|
||||
|
||||
async function stopRemoteCacheServer() {
|
||||
const pid = core.getState('remote-cache-server-pid')
|
||||
if (pid) {
|
||||
try {
|
||||
process.kill(pid, 'SIGTERM')
|
||||
core.debug(`Stopped remote cache server with PID: ${pid}`)
|
||||
} catch (error) {
|
||||
core.error(`Failed to stop remote cache server with PID: ${pid}. Error: ${error}`)
|
||||
}
|
||||
}
|
||||
|
||||
const logPath = config.remoteCacheServer.logPath
|
||||
if (fs.existsSync(logPath)) {
|
||||
const logContent = fs.readFileSync(logPath, 'utf8')
|
||||
core.debug(`Remote cache server log:\n${logContent}`)
|
||||
}
|
||||
}
|
||||
|
||||
async function saveCaches() {
|
||||
await saveCache(config.bazeliskCache)
|
||||
await saveCache(config.diskCache)
|
||||
|
|
|
|||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue