-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adrian Cole <[email protected]>
- Loading branch information
Adrian Cole
committed
Feb 18, 2024
1 parent
41f61ac
commit 1012306
Showing
2 changed files
with
126 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Continuous Build Docker | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build-zipkin-gcp: | ||
name: Build Zipkin GCP | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 10 | ||
# Remove apt repos that are known to break from time to time. | ||
# See https://github.com/actions/virtual-environments/issues/323 | ||
- name: Remove broken apt repos [Ubuntu] | ||
run: | | ||
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | ||
# Setup latest JDK. We do this to ensure users don't need to use the same version as our | ||
# release process. Release uses JDK 11, the last version that can target 1.6 bytecode. | ||
- name: Setup java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 15 | ||
- name: Cache Maven Modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: m2-repository-${{ hashFiles('**/pom.xml') }} | ||
- name: Install Docker | ||
uses: docker-practice/actions-setup-docker@master | ||
with: | ||
docker_version: 19.03 | ||
# Avoid pulling image from Docker Hub as it would consume pull quota | ||
docker_buildx: false | ||
- name: Cache docker | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.docker | ||
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }} | ||
restore-keys: ${{ runner.os }}-docker | ||
- name: Execute Zipkin GCP Build | ||
# Skips tests and license to run faster and allow shallow clones | ||
run: ./mvnw -T1C -q --batch-mode -DskipTests -Dlicense.skip=true clean package | ||
shell: bash | ||
env: | ||
CI: true | ||
- name: Build Docker image openzipkin/zipkin-gcp:test | ||
run: RELEASE_FROM_MAVEN_BUILD=true docker/build_image openzipkin/zipkin-gcp:test | ||
- name: Verify Docker image openzipkin/zipkin-gcp:test | ||
env: | ||
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} | ||
run: | | ||
# This just makes sure containers run and the HEALTHCHECK works (for now..) | ||
COMPOSE_FILE=./.github/workflows/docker/docker-compose.test.yml | ||
docker-compose -f "${COMPOSE_FILE}" up -d --quiet-pull | ||
docker/bin/block_on_health sut || (docker logs sut && exit 1) |
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,66 @@ | ||
--- | ||
name: test_readme | ||
|
||
# These test build commands mentioned in various README.md files. | ||
# | ||
# We don't test documentation-only commits. | ||
on: # yamllint disable-line rule:truthy | ||
push: # non-tagged pushes to master | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '*' | ||
paths-ignore: | ||
- '**/*.md' | ||
- './build-bin/*lint' | ||
- ./build-bin/mlc_config.json | ||
pull_request: # pull requests targeted at the master branch. | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**/*.md' | ||
- './build-bin/*lint' | ||
- ./build-bin/mlc_config.json | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish | ||
# skip commits made by the release plugin | ||
if: "!contains(github.event.head_commit.message, 'maven-release-plugin')" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
# Remove apt repos that are known to break from time to time. | ||
# See https://github.com/actions/virtual-environments/issues/323 | ||
- name: Remove broken apt repos | ||
run: | | ||
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/` | ||
do sudo rm $apt_file | ||
done | ||
- name: Setup java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' # zulu as it supports a wide version range | ||
java-version: '21' # Most recent LTS | ||
# Don't attempt to cache Docker. Sensitive information can be stolen | ||
# via forks, and login session ends up in ~/.docker. This is ok because | ||
# we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-jdk-21-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-jdk-21-maven- | ||
- name: Build zipkin-module-gcp | ||
run: ./mvnw --also-make -pl :zipkin-module-gcp clean package | ||
env: | ||
MAVEN_CONFIG: '-T1C -q --batch-mode -DskipTests' | ||
- name: docker/README.md - openzipkin/zipkin | ||
run: | | ||
build-bin/docker/docker_build openzipkin/zipkin-gcp:test && | ||
build-bin/docker/docker_test_image openzipkin/zipkin-gcp:test | ||
env: | ||
RELEASE_FROM_MAVEN_BUILD: true | ||
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} | ||