forked from pcdavies/TwitterFeed
-
Notifications
You must be signed in to change notification settings - Fork 751
/
wercker.yml.final
48 lines (42 loc) · 1.28 KB
/
wercker.yml.final
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
#Use OpenJDK base docker image from dockerhub and open the application port on the docker container
box:
id: openjdk:8
ports:
- 8080
#Build our application using Maven, just as we always have
build:
steps:
- install-packages:
packages: maven
- script:
name: maven build
code: mvn clean assembly:assembly
#Push the docker image with our built and tested application to the Oracle Container Registry
push-release:
steps:
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
repository: $DOCKER_REPO
registry: $DOCKER_REGISTRY
tag: $WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
working-dir: /pipeline/source
ports: $PORT
cmd: sh target/bin/start
#Deploy our container from the Oracle Container Registry to the Oracle Container Engine (Kubernetes)
deploy-to-cluster:
box:
id: alpine
cmd: /bin/sh
steps:
- bash-template
- script:
name: "Visualise Kubernetes config"
code: cat kubernetes.yml
- kubectl:
name: deploy to kubernetes
server: $KUBERNETES_MASTER
#username: $KUBERNETES_USERNAME
token: $KUBERNETES_TOKEN
insecure-skip-tls-verify: true
command: apply -f kubernetes.yml