Skip to content

Commit

Permalink
#9 Deploy etcd in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nhinze23 committed Dec 5, 2023
1 parent de9af1e commit 384f031
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ node('docker') {
}
}

stage('Deploy etcd') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'harborhelmchartpush', usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD']]) {
k3d.helm("registry login ${registry} --username '${HARBOR_USERNAME}' --password '${HARBOR_PASSWORD}'")
k3d.helm("install k8s-etcd oci://${registry}/${registry_namespace}/k8s-etcd --version 3.5.9-1")
}
}

stage('Wait for etcd to be ready') {
sleep(time: 5, unit: "SECONDS")
k3d.kubectl("wait --for=condition=ready pod -l statefulset.kubernetes.io/pod-name=etcd-0 --timeout=300s")
}

stage('Deploy job') {
k3d.helm("install ${repositoryName} ${helmChartDir}")
}
Expand Down

0 comments on commit 384f031

Please sign in to comment.