Commit f41faa6c by v_vjyjiang

d

parent da01d76b
...@@ -14,7 +14,6 @@ app.post("/upline", async function (req, res, next) { ...@@ -14,7 +14,6 @@ app.post("/upline", async function (req, res, next) {
if (req.body && req.body.push_data) { if (req.body && req.body.push_data) {
version = req.body.push_data.tag version = req.body.push_data.tag
} }
if (version) { if (version) {
let endindex = version.lastIndexOf(".") let endindex = version.lastIndexOf(".")
let mapkey = version.substring(0, endindex) let mapkey = version.substring(0, endindex)
...@@ -27,9 +26,13 @@ app.post("/upline", async function (req, res, next) { ...@@ -27,9 +26,13 @@ app.post("/upline", async function (req, res, next) {
let filepath = path.resolve(__dirname, filename) let filepath = path.resolve(__dirname, filename)
let patternstr = `kubectl set image -f ${filepath} ${containerName}=registry.cn-beijing.aliyuncs.com/hantang2/imgshare:${version}` let patternstr = `kubectl set image -f ${filepath} ${containerName}=registry.cn-beijing.aliyuncs.com/hantang2/imgshare:${version}`
console.log(patternstr) console.log(patternstr)
let { stdout, stderr } = await exec(patternstr) try {
console.log('stdout:', stdout); let { stdout, stderr } = await exec(patternstr)
console.error('stderr:', stderr); console.log('stdout:', stdout);
console.error('stderr:', stderr);
} catch (e) {
res.end("ok")
}
} }
res.end("ok") res.end("ok")
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment