Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 0 additions & 162 deletions .circleci/config.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
# Each line is a file pattern followed by one or more owners.

# global
* @hypertrace/trace-pipeline-owners
* @hypertrace/trace-pipeline-owners

# GH action
.github/ @aaron-steinfeld @jbahire @kotharironak @buchi-busireddy
36 changes: 25 additions & 11 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,57 @@ on:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request:
pull_request_target:
branches:
- main
# workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard.
# See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:

jobs:
build-on-linux:
# Ubuntu-20.04 runner comes with docker 19.03 and OpenJDK 11 and we are using that here.
# Ubuntu-20.04 runner comes with docker 19.03 and OpenJDK 11 and we are using that here.
runs-on: ubuntu-20.04
name: Build and run Docker images
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
submodules: recursive
- name: Cache Gradle
uses: actions/cache@v1

- name: create checksum file
uses: hypertrace/github-actions/checksum@main

- name: Cache packages
id: cache-packages
uses: actions/cache@v2
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle.kts') }}
restore-keys: ${{ runner.os }}-gradle
- name: Invoke Docker build with Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: dockerBuildImages
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
restore-keys: |
gradle-packages-${{ runner.os }}-${{ github.job }}
gradle-packages-${{ runner.os }}

- name: Build with Gradle
uses: hypertrace/github-actions/gradle@main
with:
args: dockerBuildImages

- name: Verify hypertrace image
working-directory: ./.github/workflows/hypertrace-ingester
# Below tests a docker-compose.yml service named 'sut' with a valid HEALTHCHECK instruction:
run: |
docker-compose -f docker-compose.yml -f docker-compose-zipkin-example.yml up -d || { ../scripts/inspect.sh ; exit 1 ; }

- name: Waits for some stability
working-directory: ./.github/workflows/hypertrace-ingester
run: |
sleep 60 # you can decrease it but never increase it
docker-compose -f docker-compose.yml ps

- name: Runs tests
working-directory: ./.github/workflows/hypertrace-ingester/scripts
run: ./tests.sh
15 changes: 5 additions & 10 deletions .circleci/helm.sh → .github/workflows/helm.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/sh
set -eu

script=$0

SCRIPT_DIR="$( cd "$( dirname "$script" )" >/dev/null 2>&1 && pwd )"
ROOT_PROJECT_DIR="$(dirname "${SCRIPT_DIR}")"
cd $ROOT_PROJECT_DIR
SUB_PROJECTS_DIRS=$(find . -iname "helm" | sed 's/\(.*\)\/.*/\1/')

subcommand=$1; shift
Expand All @@ -18,22 +13,22 @@ case "$subcommand" in
helm dependency update ./helm/
helm lint --strict ./helm/
helm template ./helm/
cd $ROOT_PROJECT_DIR
cd ..
done
;;
package)
CHART_VERSION=$(git describe --abbrev=0)
CHART_VERSION=$(echo ${GITHUB_REF} | cut -d/ -f 3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here GITHUB_REF will be tag, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GITHUB_REF will be something like GITHUB_REF=refs/tags/0.5.0 so we are extracting tag from that.

for SUB_PROJ_DIR in $SUB_PROJECTS_DIRS; do
cd $SUB_PROJ_DIR
echo "*******"
echo "building charts for:$(pwd)"
helm dependency update ./helm/
helm package --version ${CHART_VERSION} --app-version ${CHART_VERSION} ./helm/
cd $ROOT_PROJECT_DIR
cd ..
done
;;
publish)
CHART_VERSION=$(git describe --abbrev=0)
CHART_VERSION=$(echo ${GITHUB_REF} | cut -d/ -f 3)
export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/helm-gcs-key.json
echo ${HELM_GCS_CREDENTIALS} > ${GOOGLE_APPLICATION_CREDENTIALS}
helm repo add helm-gcs ${HELM_GCS_REPOSITORY}
Expand All @@ -43,7 +38,7 @@ case "$subcommand" in
echo "publishing charts for:$(pwd)"
CHART_NAME=$(awk '/^name:/ {print $2}' ./helm/Chart.yaml)
helm gcs push ${CHART_NAME}-${CHART_VERSION}.tgz helm-gcs --public --retry
cd $ROOT_PROJECT_DIR
cd ..
done
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hypertrace-ingester/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
condition: service_healthy

sut:
image: hypertrace/hypertrace-ingester:test
image: hypertrace/hypertrace-ingester:main
container_name: sut
environment:
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/merge-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: merge-publish
on:
push:
branches:
- main
workflow_dispatch:

jobs:
merge-publish:
runs-on: ubuntu-20.04
steps:
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
- name: Check out code
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: create checksum file
uses: hypertrace/github-actions/checksum@main

- name: Cache packages
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-packages-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/checksum.txt') }}
restore-keys: |
gradle-packages-${{ runner.os }}-${{ github.job }}
gradle-packages-${{ runner.os }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}

- name: push docker image
uses: hypertrace/github-actions/gradle@main
with:
args: dockerPushImages
env:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_PUBLISH_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }}
Loading