Skip to content

Commit

Permalink
attempt to restore docker test
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Feb 18, 2024
1 parent 41f61ac commit 1012306
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Continuous Build Docker

Check warning on line 1 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

1:1 [document-start] missing document start "---"
on:

Check warning on line 2 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

2:1 [truthy] truthy value should be one of [false, true]
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

Check failure on line 21 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

21:81 [line-length] line too long (99 > 80 characters)
# Setup latest JDK. We do this to ensure users don't need to use the same version as our

Check failure on line 22 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

22:81 [line-length] line too long (94 > 80 characters)
# release process. Release uses JDK 11, the last version that can target 1.6 bytecode.

Check failure on line 23 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

23:81 [line-length] line too long (92 > 80 characters)
- 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

Check failure on line 47 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

47:81 [line-length] line too long (86 > 80 characters)
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

Check failure on line 52 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

52:81 [line-length] line too long (88 > 80 characters)
- name: Verify Docker image openzipkin/zipkin-gcp:test
env:
GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }}

Check failure on line 55 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

55:81 [line-length] line too long (101 > 80 characters)
run: |
# This just makes sure containers run and the HEALTHCHECK works (for now..)

Check failure on line 57 in .github/workflows/docker-tests.yml

View workflow job for this annotation

GitHub Actions / Lint

57:81 [line-length] line too long (85 > 80 characters)
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)
66 changes: 66 additions & 0 deletions .github/workflows/test_readme.yml
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 }}

Check failure on line 66 in .github/workflows/test_readme.yml

View workflow job for this annotation

GitHub Actions / Lint

66:81 [line-length] line too long (101 > 80 characters)

0 comments on commit 1012306

Please sign in to comment.