temp commit
This commit is contained in:
43
test/network/Jenkinsfile
vendored
Normal file
43
test/network/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'magicsong/nete2e:v0.0.1'
|
||||
args '-v gomod:/go -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
KUBECONFIG = "/root/.kube/config"
|
||||
}
|
||||
stages {
|
||||
stage('set kubeconfig and secret'){
|
||||
steps{
|
||||
sh 'mkdir -p ~/.kube'
|
||||
sh 'mkdir ./kustomize/network/etcd'
|
||||
withCredentials([kubeconfigContent(credentialsId: 'net-kubeconfig', variable: 'KUBECONFIG_CONTENT'),
|
||||
file(credentialsId: 'etcd-ca', variable: 'etcd-ca'),
|
||||
file(credentialsId: 'etcd-crt', variable: 'etcd-crt'),
|
||||
file(credentialsId: 'etcd-key', variable: 'etcd-key')]) {
|
||||
sh 'echo "$KUBECONFIG_CONTENT" > ~/.kube/config'
|
||||
sh "cp \${etcd-ca} ./kustomize/network/etcd/ca"
|
||||
sh "cp \${etcd-key} ./kustomize/network/etcd/key"
|
||||
sh "cp \${etcd-crt} ./kustomize/network/etcd/crt"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('testing') {
|
||||
steps {
|
||||
sh """
|
||||
make network-e2e
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('cleanup'){
|
||||
steps{
|
||||
sh """
|
||||
rm -rf ./kustomize/network/etcd
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user