try CI builds
This commit is contained in:
parent
6e3f57d1bf
commit
009dbcdd08
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
image: docker:latest
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
|
||||||
|
NAME: $CI_PROJECT_NAME
|
||||||
|
|
||||||
|
build_and_push:
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
- docker build -t $IMAGE_TAG .
|
||||||
|
- docker push $IMAGE_TAG
|
||||||
|
|
||||||
|
only_build:
|
||||||
|
stage: build
|
||||||
|
except:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- docker build -t $IMAGE_TAG .
|
|
@ -7,7 +7,6 @@ RUN ./gradlew bootJar
|
||||||
|
|
||||||
FROM openjdk:8-jre-alpine
|
FROM openjdk:8-jre-alpine
|
||||||
|
|
||||||
COPY --from=build /app/build/libs/OttoBot*.jar /otto.jar
|
COPY --from=build /app/build/libs/ottobot.jar /otto.jar
|
||||||
RUN chmod +x /otto.jar
|
|
||||||
|
|
||||||
CMD java -jar /otto.jar
|
CMD java -jar /otto.jar
|
|
@ -43,6 +43,7 @@ dependencies {
|
||||||
|
|
||||||
bootJar {
|
bootJar {
|
||||||
mainClassName = 'nl.voidcorp.discord.MainKt'
|
mainClassName = 'nl.voidcorp.discord.MainKt'
|
||||||
|
archiveName="ottobot.jar"
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|
Loading…
Reference in a new issue