Skip to content

Instantly share code, notes, and snippets.

@lukaszlach
Created March 1, 2019 19:50
Show Gist options
  • Save lukaszlach/c9105c189e851db66ed75ca583517b0b to your computer and use it in GitHub Desktop.
Save lukaszlach/c9105c189e851db66ed75ca583517b0b to your computer and use it in GitHub Desktop.
stages:
- build
- test
- docker
build:
stage: build
image: openjdk:8-jdk-alpine
artifacts:
untracked: true
script:
- javac HelloWorld.java
test:
stage: test
image: openjdk:8-jre-alpine
script:
- java HelloWorld
docker:
stage: docker
before_script:
- docker login registry.gitlab.local -u root -p passw0rd
script:
- docker build -t registry.gitlab.local/root/java:latest .
- docker push registry.gitlab.local/root/java:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment