This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair") | |
load(":venv.bzl", "py_venv") | |
load(":wrapper.bzl", "py_wrapper") | |
py_venv( | |
name = "py3_venv", | |
# caching the venv interpreter doesn't work for two reasons: | |
# | |
# * there are no platform dependencies on this target: the cache will contain binaries for the wrong OS | |
# * there are no dependencies on the interpreter binary or standard library: the cache may contain stale versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE TypeOperators #-} | |
import Data.Proxy | |
import GHC.Generics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// find all build.gradle files in the expected locations in the build tree | |
fileTree('.') | |
.matching { | |
exclude '**/src/**', '**/build/**', '**/.*' | |
include '**/build.gradle' | |
} | |
.each { | |
// then convert the file path to a project path | |
final relative = rootProject.projectDir.relativePath(it.parentFile) | |
final project = ":${relative.replace('/', ':')}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Control.Concurrent (forkIO) | |
import Control.Concurrent.STM | |
import Control.Monad (when) | |
import Control.Monad.Trans (liftIO) | |
import Network.HTTP.Types | |
import Network.Wai as Wai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_docker//container:providers.bzl", "BundleInfo", "ImageInfo") | |
load("//deployment/docker:image_name.bzl", "image_name") | |
load(":providers.bzl", "DigestInfo", "RepoInfo") | |
def _bundle_impl(target, ctx): | |
bundle_info = target[BundleInfo] | |
return RepoInfo(image_digests = { | |
image_name(bundle_info, x[ImageInfo]): x[DigestInfo] | |
for x in ctx.rule.attr.image_targets | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -fno-warn-deprecations #-} | |
{-# OPTIONS_GHC -fno-warn-orphans #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module Main (main) where | |
import Control.Monad (when) | |
import qualified Data.ByteString.Lazy as BL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine@sha256:ddba4d27a7ffc3f86dd6c2f92041af252a1f23a8e742c90e6e1297bfa1bc0c45 AS build | |
RUN apk add --no-cache ca-certificates curl python3 | |
ARG CLOUD_SDK_VERSION=280.0.0 | |
RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \ | |
| tar xzf - | |
RUN /google-cloud-sdk/install.sh \ | |
--bash-completion=false \ | |
--override-components beta pubsub-emulator \ | |
--path-update=false \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_docker//container:bundle.bzl", "container_bundle") | |
load("@io_bazel_rules_docker//container:image.bzl", "container_image") | |
load("@io_bazel_rules_docker//contrib:push-all.bzl", _push_bundle = "docker_push") | |
container_image( | |
name = "my_first_image", | |
... | |
) | |
container_image( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
NewerOlder