Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,14 @@ deploy:
- scp -r -v -o StrictHostKeyChecking=no ./target/json-schema-store-*.jar tc_spo01@wp-p1m2-3d:~/deployments/sw/www/json-schema-store/json-schema-store.jar
- ssh -v -o StrictHostKeyChecking=no tc_spo01@wp-p1m2-3d "~/config/start.sh"
# only:
# - master
# - master

deploy-dev-json-schema-store-k8:
image: dtzar/helm-kubectl
stage: deploy
script:
- sed -i s#%DOCKER_IMAGE%#$CI_REGISTRY_IMAGE\:$CI_COMMIT_SHA#g Kubernetes-dev-deployment.yaml
- kubectl delete secret gitlab --namespace=bsd-dev
- kubectl create secret docker-registry gitlab --docker-server=$CI_REGISTRY --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL --namespace=bsd-dev
- kubectl apply -f Kubernetes-dev-deployment.yaml --namespace=bsd-dev
when: manual
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jre
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} json-schema-store.jar
ENTRYPOINT ["java","-jar","/json-schema-store.jar", "--spring.profiles.active=docker"]
ENTRYPOINT ["java","-jar","/json-schema-store.jar"]
44 changes: 44 additions & 0 deletions Kubernetes-dev-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: json-schema-store
spec:
replicas: 2
selector:
matchLabels:
app: json-schema-store
template:
metadata:
labels:
app: json-schema-store
spec:
containers:
- name: json-schema-store
image: %DOCKER_IMAGE%
imagePullPolicy: IfNotPresent
args: ["--spring.profiles.active=docker"]
ports:
- containerPort: 8110
livenessProbe:
httpGet:
path: <enter_health_path_here>
port: 8110
initialDelaySeconds: 100
timeoutSeconds: 15
periodSeconds: 10
failureThreshold: 2
imagePullSecrets:
- name: gitlab
---
apiVersion: v1
kind: Service
metadata:
name: json-schema-store
spec:
ports:
- port: 8110
targetPort: 8110
selector:
app: json-schema-store
type: NodePort
externalTrafficPolicy: Local