-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature: Packaging This changeset introduces initial packaging for Gust, and for apps that use Gust. Changes so far: - [x] Fixup package for eventual publish to `npm` - [x] Add support for GitHub packages - [x] Add support for `rules_docker` targets - [x] Add support for tarball targets * Update Micronaut -> 1.3.0 * Upgrade Yarn dependencies * Upgrade Bazel dependencies * Fixes and functionality for crosslib builds - Fix defs when used in a cross-lib context - Fix DOM test - Tighten up DualStackTest * Initial support for container targets - Add Java container target - Add example push command (currently blocked on bazelbuild/rules_docker#1413) * Re-enable container tag via BUILD_SCM_VERSION * Fix workspace status command file * Working container build-and-run flow - Ability to build Java app containers, and push them to GCR - Tested containers locally (manually for now) * Update fork of rules_closure * Remove forced JDK8 build flags * Update J2CL with static bootclasspath * Update rules_graal with new attrs for debugging * Initial build flow for Graal native binary targets - Setup build lib - Attach to Graal image - Override default compiler path (workaround for Bazel bug) * Re-enable disk caching in CI * Native binary support, with container image - Support building via `native-image` - Support pushing to container repo for native image - No cross-platform build support yet (oracle/graal#407) * Fix injected testdeps * Don't enable native targets without a flag * Add CI routine for baking samples * Cleaner CI flow * Attempt GCR auth fix, flush keys * Another credentials fix * Fix Bazel label in regular CI job * Try auth via gcloud * Explicitly activate gcloud key * Apply new auth to sample image build * Fixup key paths in CI * Move GCP install step up in CI flow * Cleanup CI configs * Use relative access to service key from env * Unify image bake, restore Docker index pull * Add base container build file * Use new base container
- Loading branch information
Showing
29 changed files
with
1,114 additions
and
725 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Samples | ||
|
||
on: | ||
push: {} | ||
#push: | ||
# branches: ["master"] | ||
|
||
env: | ||
BAZELISK_VERSION: v1.2.1 | ||
|
||
jobs: | ||
build: | ||
name: "Sample Images" | ||
|
||
strategy: | ||
matrix: | ||
os: [["Ubuntu", "ubuntu-latest", "linux-amd64", "linux-x86_64"]] | ||
bazel: ["2.0.0"] | ||
gcloud: ["279.0.0"] | ||
|
||
runs-on: ${{ matrix.os[1] }} | ||
|
||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Prepare Cache | ||
id: cache-ci | ||
uses: actions/cache@v1 | ||
with: | ||
path: "/home/runner/.cache/bazel-disk-cache" | ||
key: bazel-{{ matrix.bazel }}-{{ matrix.os[1] }}-v1 | ||
|
||
- name: Bake Images | ||
run: | | ||
curl -LO "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${{ matrix.gcloud }}-${{ matrix.os[3] }}.tar.gz" | ||
mv google-cloud-sdk-${{ matrix.gcloud }}-${{ matrix.os[3] }}.tar.gz google-cloud-sdk.tar.gz | ||
tar -xf google-cloud-sdk.tar.gz | ||
echo "$SERVICE_KEY" > "${GITHUB_WORKSPACE}/service-key.json" | ||
./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=`pwd`/service-key.json | ||
./google-cloud-sdk/bin/gcloud auth configure-docker | ||
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-${{ matrix.os[2] }}" | ||
mkdir -p "${GITHUB_WORKSPACE}/bin/" | ||
mv bazelisk-${{ matrix.os[2] }} "${GITHUB_WORKSPACE}/bin/bazelisk" | ||
chmod +x "${GITHUB_WORKSPACE}/bin/bazelisk" | ||
echo "${{ matrix.bazel }}" > .bazelversion | ||
export PATH="$PATH:${GITHUB_WORKSPACE}/google-cloud-sdk/bin" | ||
make samples BAZELISK="${GITHUB_WORKSPACE}/bin/bazelisk" CI=yes CACHE=yes | ||
env: | ||
SERVICE_KEY: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
GOOGLE_APPLICATION_CREDENTIALS: service-key.json |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM alpine:3.11 | ||
|
||
ENV LANG=C.UTF-8 | ||
|
||
# Here we install GNU libc (aka glibc) and set C.UTF-8 locale as default. (originally from `frolvlad`) | ||
|
||
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \ | ||
ALPINE_GLIBC_PACKAGE_VERSION="2.30-r0" && \ | ||
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ | ||
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ | ||
echo \ | ||
"-----BEGIN PUBLIC KEY-----\ | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\ | ||
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\ | ||
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\ | ||
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\ | ||
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\ | ||
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\ | ||
1QIDAQAB\ | ||
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
wget \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
apk add --no-cache \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ | ||
\ | ||
rm "/etc/apk/keys/sgerrand.rsa.pub" && \ | ||
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \ | ||
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \ | ||
\ | ||
apk del glibc-i18n && \ | ||
\ | ||
rm "/root/.wget-hsts" && \ | ||
apk del .build-dependencies && \ | ||
rm \ | ||
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ | ||
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" | ||
|
||
# Extra packages | ||
|
||
RUN apk update && \ | ||
apk add libstdc++ && \ | ||
rm -rf /var/cache/apk/* | ||
|
Oops, something went wrong.