Advertisement
PandaAcademy

Push to repo stage

Apr 11th, 2024
769
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.63 KB | None | 0 0
  1.  stage ('Push to Repo') {
  2.             steps {
  3.                 dir('ArgoCD') {
  4.                     withCredentials([gitUsernamePassword(credentialsId: 'git', gitToolName: 'Default')]) {
  5.                         git branch: 'main', url: 'https://github.com/Panda-Academy-Core-2-0/ArgoCD.git'
  6.                         sh """ cd frontend
  7.                        sed -i "s#$imageName.*#$imageName:$dockerTag#g" deployment.yaml
  8.                        git commit -am "Set new $dockerTag tag."
  9.                        git push origin main
  10.                        """
  11.                     }
  12.                 }
  13.             }
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement