Skip to content

Instantly share code, notes, and snippets.

@rcandidosilva
Created December 17, 2018 16:06
Show Gist options
  • Save rcandidosilva/034c6486f5efeadf55798c689f502a8e to your computer and use it in GitHub Desktop.
Save rcandidosilva/034c6486f5efeadf55798c689f502a8e to your computer and use it in GitHub Desktop.
MicroProfile Oracle Cloud - wercker.yml
#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 package
#Build and push the docker image with our built and tested application to the Oracle Container Registry
push-release:
steps:
- internal/docker-build:
dockerfile: Dockerfile
image-name: microprofile
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
repository: $DOCKER_REPO
registry: $DOCKER_REGISTRY
image-name: microprofile
tag: latest
#Deploy our container from the Oracle Container Registry to the Oracle Container Engine
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
token: $KUBERNETES_TOKEN
insecure-skip-tls-verify: true
command: apply -f kubernetes.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment