Skip to content

Commit

Permalink
#5 configure jib to be able to build image to ghcr.io
Browse files Browse the repository at this point in the history
Currently only building latest versions of images; can worry about proper versioning later.
  • Loading branch information
chadlwilson committed Nov 10, 2021
1 parent 110826b commit 08f963f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ touch my-dataset-configs/config1.yml my-dataset-configs/config2.yml
docker run -p 8080:8080 \
-v $(pwd)/my-dataset-configs:/config \
-e MICRONAUT_CONFIG_FILES=/config/config1.yml,/config/config2.yml \
recce/recce-server
recce-server
```
### Configuring datasources
Expand Down
2 changes: 1 addition & 1 deletion batect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ containers:
enable_init_process: true
command: sh -c "sleep 86400"
recce-docker-prebuilt:
image: recce/recce-server
image: recce-server
dependencies:
- recce-db
- source-db # Expected to be defined by an included file
Expand Down
18 changes: 17 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,27 @@ tasks.jacocoTestReport {
dependsOn(tasks.test)
}

val githubRepoOwner = "chadlwilson"
val containerRepoName = "recce-server"
jib {
from {
image = "eclipse-temurin:${depVersions["javaMajor"]}-jdk-alpine"
}
to {
image = "recce/recce-server"
image = "ghcr.io/$githubRepoOwner/$containerRepoName"
tags = setOf(version as String, "latest")
}
container {
creationTime = "USE_CURRENT_TIMESTAMP"
labels.set(mapOf("org.opencontainers.image.source" to "https://github.com/$githubRepoOwner/recce"))
}
}

// use different naming when building locally, to avoid confusion
tasks.jibDockerBuild.configure {
jib {
to {
image = containerRepoName
}
}
}

0 comments on commit 08f963f

Please sign in to comment.