Skip to content

Instantly share code, notes, and snippets.

View teyckmans's full-sized avatar
🎯
Working on KubeRig ow yeah!

Tom Eyckmans teyckmans

🎯
Working on KubeRig ow yeah!
View GitHub Profile
@teyckmans
teyckmans / .gitlab-ci.yml
Last active June 13, 2019 20:29
GitLab CI file for Gradle build with build/check/publish stages
View .gitlab-ci.yml
image: adoptopenjdk/openjdk12:alpine
stages:
- build
- check
- publish
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
@teyckmans
teyckmans / DslExtensions.kt
Last active May 26, 2019 21:55
KubeRig resourcesHelper extension function
View DslExtensions.kt
package example
import io.k8s.api.core.v1.ContainerDsl
fun ContainerDsl.resourcesHelper(cpuRequest: String = "", memoryRequest: String = "", cpuLimit: String = "", memoryLimit: String = "") {
resources {
if (cpuRequest != "" || memoryRequest != "") {
requests {
if (cpuRequest != "") {
request("cpu") {