Skip to content

Commit

Permalink
refactor(jenkinsfile): update dev jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Sep 29, 2023
1 parent 32a3e72 commit 513d9be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/Jenkinsfile-public-dev
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pipeline {
stage('Install Depends && Build') {
steps {
container('ubuntu') {
withCredentials([file(credentialsId: 'frontend-public-dev', variable: 'text')]) {
withCredentials([file(credentialsId: 'frontend-public-dev-env', variable: 'text')]) {
writeFile file:'./.env', text: readFile(text)
}
sh 'npm i --force'
Expand All @@ -74,19 +74,19 @@ pipeline {
stage('Docker Build && Push') {
steps {
container('docker') {
sh "docker build -t robolaunchio/ui-httpd:${env.VER} ."
sh "docker build -t robolaunchio/frontend-public-dev-httpd:${env.VER} ."
withCredentials([usernamePassword(credentialsId: 'dockerhub-robolaunchio', passwordVariable: 'password', usernameVariable: 'username')]) {
sh 'docker login -u $username -p $password'
}
sh "docker push robolaunchio/ui-httpd:${env.VER}"
sh "docker push robolaunchio/frontend-public-dev-httpd:${env.VER}"
}
}
}
stage('Kubernetes Deploy') {
steps {
container('ubuntu') {
withCredentials([file(credentialsId: 'hetzner_prod', variable: 'config')]) {
sh "kubectl set image deployment.v1.apps/ui -n ui ui=robolaunchio/ui-httpd:${env.VER} --kubeconfig=$config"
sh "kubectl set image deployment.v1.apps/ui -n ui ui=robolaunchio/frontend-public-dev-httpd:${env.VER} --kubeconfig=$config"
}
}
}
Expand Down

0 comments on commit 513d9be

Please sign in to comment.