Porting manual build-trigger to kubectl

@mfojtik @soltysh can you please check this porting effort to kubectl, since your have been working on the kubectl :two_men_holding_hands: 
@csrwng if I don't initialize it before the if-else block I will get `undefined: newBuild` error on compilation