diff --git a/.drone.yml b/.drone.yml index 56377fca..8c4b3332 100644 --- a/.drone.yml +++ b/.drone.yml @@ -107,6 +107,8 @@ steps: target: prod config: from_secret: gcr_admin + build_args: + - BUILDKIT_INLINE_CACHE=1 depends_on: - Lint Backend - Unit Test Backend @@ -128,6 +130,8 @@ steps: from_secret: docker_password username: from_secret: docker_username + build_args: + - BUILDKIT_INLINE_CACHE=1 depends_on: - Lint Backend - Unit Test Backend @@ -244,6 +248,11 @@ steps: # Be aware that the this plugin requires privileged capabilities, otherwise the integrated # Docker daemon is not able to start. privileged: true + environment: + # force docker to use buildkit feature, this will skip build stages that aren't required in + # the final image (ie. dev & dev-enterprise) + # https://github.com/docker/cli/issues/1134#issuecomment-406449342 + DOCKER_BUILDKIT: 1 settings: repo: grafana/oncall tags: latest,${DRONE_TAG} @@ -255,6 +264,8 @@ steps: from_secret: docker_password username: from_secret: docker_username + build_args: + - BUILDKIT_INLINE_CACHE=1 depends_on: - set engine version diff --git a/Tiltfile b/Tiltfile index da178445..446b3970 100644 --- a/Tiltfile +++ b/Tiltfile @@ -31,13 +31,11 @@ def plugin_json(): allow_k8s_contexts(["kind-kind"]) -local_resource("download-cache", cmd="docker pull grafana/oncall:latest; docker tag grafana/oncall localhost:63628/grafana/oncall:latest") - # Build the image including frontend folder for pytest docker_build_sub( "localhost:63628/oncall/engine:dev", context="./engine", - cache_from="localhost:63628/grafana/oncall:latest", + cache_from="grafana/oncall:latest", # only=["./engine", "./grafana-plugin"], ignore=["./grafana-plugin/test-results/", "./grafana-plugin/dist/", "./grafana-plugin/e2e-tests/"], child_context=".",