forked from barchetta/helidon-se-codeone-2018
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwercker.yml
70 lines (63 loc) · 2.05 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This references an OpenJDK container from the
# Docker Hub https://hub.docker.com/_/openjdk/
# Read more about containers on our dev center
# https://devcenter.wercker.com/overview-and-core-concepts/containers/
box: openjdk:8-jdk
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# https://devcenter.wercker.com/development/pipelines/
build:
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# https://devcenter.wercker.com/development/steps/
steps:
# https://github.com/wercker/step-maven
- script:
name: import
code: |
export _JAVA_OPTIONS=-Djdk.net.URLClassPath.disableClassPathURLCheck=true
- wercker/maven:
goals: clean install
version: 3.5.4
- wercker/maven:
goals: package
version: 3.5.4
push-release:
steps:
- script:
name: prepare
code: |
ls -la
#mv workshop-web /workshop-web
ls -la
# The step above should leave us with a Kubernetes service and deployment yml files.
# We'll create a directory to move them to.
- script:
name: Prepare Kubernetes files
code: |
cp -r target $WERCKER_OUTPUT_DIR/target
- internal/docker-push:
ports: "8080"
working-dir: /pipeline/source
cmd: java -jar target/quickstart-se.jar
env: "CI=true"
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
repository: $DOCKER_REPO
registry: https://iad.ocir.io/v2
deploy-to-kubernetes:
box: python:2.7
steps:
# `apply` is a good command to use here, as it'll create Kubernetes entities if they are missing.- script:
- script:
name: prepare
code: |
ls -lra $WERCKER_OUTPUT_DIR/
#mv workshop-web /workshop-web
- kubectl:
name: deploy to kubernetes
cwd: target
server: $OKE_MASTER
token: $OKE_TOKEN
insecure-skip-tls-verify: true
command: apply -f app.yaml