Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sherix88 committed Jun 27, 2018
1 parent 74b7422 commit 4c82a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ app.all('*', function(req, res, next) {
app.post('/', function(req, res) {
var name = req.body.repository.repo_name;
var tag = req.body.push_data.tag;
var repo = name.split("/")[1]
if(tag === "latest") {
var version = "latest"
var namespace = "siep-produccion"
Expand All @@ -36,7 +37,7 @@ app.post('/', function(req, res) {
}

if (fs.existsSync(directory)){
dir = exec('docker pull decyt/'+name+' && kubectl set image deployment/'+name+' '+name+'=decyt/'+name+':'+version+' --namespace='+namespace+' && kubectl apply -f '+directory+'/deployment.yaml', function(err, stdout, stderr) {
dir = exec('docker pull '+name+' && kubectl set image deployment/'+repo+' '+repo+'='+name+':'+version+' --namespace='+namespace+' && kubectl apply -f '+directory+'/deployment.yaml', function(err, stdout, stderr) {
if (err) { console.log(err) } else {
console.log(stdout)
/* bot.post(process.env.BOT).send({msg: "Se actualizo el repositorio "+name}).end(function(err, respuesta){
Expand Down

0 comments on commit 4c82a97

Please sign in to comment.