Added test migration
This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -48,6 +48,8 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
kubeconfig(credentialsId: 'k3s-kubeconfig') {
|
kubeconfig(credentialsId: 'k3s-kubeconfig') {
|
||||||
|
sh 'cat k8s/deployment-test.yaml | sed "s/latest/$BUILD_NUMBER/g" | kubectl apply -n swiss -f -'
|
||||||
|
sh 'kubectl apply -f k8s/service-test.yaml -n swiss'
|
||||||
sh 'cat k8s/deployment.yaml | sed "s/latest/$BUILD_NUMBER/g" | kubectl apply -n swiss -f -'
|
sh 'cat k8s/deployment.yaml | sed "s/latest/$BUILD_NUMBER/g" | kubectl apply -n swiss -f -'
|
||||||
sh 'kubectl apply -f k8s/service.yaml -n swiss'
|
sh 'kubectl apply -f k8s/service.yaml -n swiss'
|
||||||
}
|
}
|
||||||
|
|||||||
20
k8s/deployment-test.yaml
Normal file
20
k8s/deployment-test.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: swiss-test-client
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: swiss-test-client
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: swiss-test-client
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: swiss-test-client
|
||||||
|
image: upquark/swiss-client:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 4000
|
||||||
12
k8s/service-test.yaml
Normal file
12
k8s/service-test.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: swiss-test-client
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: swiss-test-client
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 4000
|
||||||
|
nodePort: 30043
|
||||||
Reference in New Issue
Block a user