Commit c6045d0f authored by 卢浩元's avatar 卢浩元

Add .gitlab-ci

parent 6e3545db
stages:
- build
- package
- deploy
maven-build:
image: harbor.k2software.cn/build/maven:3-jdk-8-alpine
stage: build
script: "mvn package -B -s ./settings.xml -Dmaven.repo.local=/root/.m2"
artifacts:
paths:
- target/*.jar
docker-build:
stage: package
script:
- docker build -t harbor.poc.paas.com/library/springboot-k8s-example:$CI_COMMIT_REF_SLUG .
- docker login -u admin -p K2pass!! harbor.poc.paas.com
- docker push harbor.poc.paas.com/library/springboot-k8s-example:$CI_COMMIT_REF_SLUG
k8s-deploy:
image: harbor.k2software.cn/build/helm:v3.2.2
stage: deploy
script:
- sed -i "s/lusyoe\\/k8s-example/harbor.poc.paas.com\\/library\\/springboot-k8s-example:$CI_COMMIT_REF_SLUG/g" charts/values.yaml
- helm upgrade --install k8s-example --namespace default ./charts/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment