Skip to content

Commit

Permalink
Slims container & bumps spinnaker gradle project version (spinnaker#1163
Browse files Browse the repository at this point in the history
)

* Bumps spinnaker gradle project version
* Slims container
  • Loading branch information
Travis Tomsu authored Feb 7, 2017
1 parent 0aa61ae commit 0c77515
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ COPY . workdir/

WORKDIR workdir

RUN GRADLE_USER_HOME=cache ./gradlew buildDeb -x test

RUN dpkg -i ./orca-web/build/distributions/*.deb
RUN GRADLE_USER_HOME=cache ./gradlew buildDeb -x test && \
dpkg -i ./orca-web/build/distributions/*.deb && \
cd .. && \
rm -rf workdir

CMD ["/opt/orca/bin/orca"]
9 changes: 9 additions & 0 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM openjdk:8u111-jre-alpine

MAINTAINER [email protected]

COPY ./orca-web/build/install/orca /opt/orca

RUN apk add --update bash && rm -rf /var/cache/apk/*

CMD ["/opt/orca/bin/orca"]
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:3.10.0"
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:3.11.0"
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.2.8.RELEASE"
classpath "io.franzbecker:gradle-lombok:1.6"
}
Expand Down
11 changes: 11 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- name: 'gcr.io/cloud-builders/git'
args: ['fetch', '--unshallow']
- name: 'java:8'
env: ["GRADLE_USER_HOME=cache"]
entrypoint: "bash"
args: [ "-c", "./gradlew orca-web:installDist -x test"]
- name: 'gcr.io/cloud-builders/docker'
args: ["build", "-t", "gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA", "-f", "Dockerfile.slim", "."]
images:
- 'gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'

0 comments on commit 0c77515

Please sign in to comment.