Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

cherry-pick commits #10

Merged
merged 4 commits into from
May 12, 2022
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
4 changes: 0 additions & 4 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: e2e test
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
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:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/merge-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: merge-publish
on:
push:
branches:
- main
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -31,13 +29,13 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
username: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
password: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}

- 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 }}
DOCKER_USERNAME: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}
46 changes: 22 additions & 24 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: build and validate
on:
push:
branches:
- main
pull_request_target:
branches:
- main
Expand Down Expand Up @@ -35,8 +33,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
username: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
password: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}

- name: Build with Gradle
uses: hypertrace/github-actions/gradle@main
Expand All @@ -48,8 +46,8 @@ jobs:
container:
image: hypertrace/helm-gcs-packager:0.3.1
credentials:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
username: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
password: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
steps:
- name: Check out code
Expand All @@ -62,21 +60,21 @@ jobs:
- name: validate charts
run: ./.github/workflows/helm.sh validate

snyk-scan:
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:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0
submodules: recursive
- name: Setup snyk
uses: snyk/actions/setup@0.3.0
- name: Snyk test
run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching='^runtimeClasspath$'
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GRADLE_OPTS: -Dorg.gradle.workers.max=1 # Snyk doesn't handle parallelism
# snyk-scan:
# 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:
# ref: ${{github.event.pull_request.head.ref}}
# repository: ${{github.event.pull_request.head.repo.full_name}}
# fetch-depth: 0
# submodules: recursive
# - name: Setup snyk
# uses: snyk/actions/setup@0.3.0
# - name: Snyk test
# run: snyk test --all-sub-projects --org=hypertrace --severity-threshold=low --policy-path=.snyk --configuration-matching='^runtimeClasspath$'
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
# GRADLE_OPTS: -Dorg.gradle.workers.max=1 # Snyk doesn't handle parallelism
2 changes: 0 additions & 2 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: test
on:
push:
branches:
- main
pull_request:

jobs:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
username: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
password: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}

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

publish-helm-charts:
runs-on: ubuntu-20.04
needs: publish-artifacts
container:
image: hypertrace/helm-gcs-packager:0.3.1
credentials:
username: ${{ secrets.DOCKERHUB_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
username: ${{ secrets.PUBLIC_DOCKER_USERNAME }}
password: ${{ secrets.PUBLIC_DOCKER_PASSWORD }}
steps:
# Set fetch-depth: 0 to fetch commit history and tags for use in version calculation
- name: Checkout Repository
Expand Down
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[submodule "attribute-service"]
path = attribute-service
url = https://github.com/hypertrace/attribute-service.git
url = https://github.com/razorpay/hypertrace-attribute-service.git
branch = main
[submodule "entity-service"]
path = entity-service
url = https://github.com/hypertrace/entity-service.git
url = https://github.com/razorpay/hypertrace-entity-service.git
branch = main
[submodule "gateway-service"]
path = gateway-service
url = https://github.com/hypertrace/gateway-service.git
url = https://github.com/razorpay/hypertrace-gateway-service.git
branch = main
[submodule "query-service"]
path = query-service
url = https://github.com/hypertrace/query-service.git
url = https://github.com/razorpay/hypertrace-query-service.git
branch = main
[submodule "hypertrace-graphql"]
path = hypertrace-graphql
url = https://github.com/hypertrace/hypertrace-graphql.git
url = https://github.com/razorpay/hypertrace-hypertrace-graphql.git
branch = main
[submodule "config-bootstrapper"]
path = config-bootstrapper
url = https://github.com/hypertrace/config-bootstrapper.git
url = https://github.com/razorpay/hypertrace-config-bootstrapper.git
branch = main
[submodule "config-service"]
path = config-service
url = https://github.com/hypertrace/config-service.git
branch = main
url = https://github.com/razorpay/hypertrace-config-service.git
branch = main
12 changes: 12 additions & 0 deletions hypertrace-data-config-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@ application {

hypertraceDocker {
defaultImage {
imageName.set("hypertrace-service")
javaApplication {
envVars.put("CLUSTER_NAME", "default-cluster")
envVars.put("POD_NAME", "default-pod")
}
namespace.set("razorpay")
}
tag("${project.name}" + "_" + versionBanner())
}

fun versionBanner(): String {
val os = com.bmuschko.gradle.docker.shaded.org.apache.commons.io.output.ByteArrayOutputStream()
project.exec {
commandLine = "git rev-parse --verify --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}

// Config for gw run to be able to run this locally. Just execute gw run here on Intellij or on the console.
Expand Down
12 changes: 12 additions & 0 deletions hypertrace-data-query-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,23 @@ application {

hypertraceDocker {
defaultImage {
imageName.set("hypertrace-service")
javaApplication {
envVars.put("CLUSTER_NAME", "default-cluster")
envVars.put("POD_NAME", "default-pod")
}
namespace.set("razorpay")
}
tag("${project.name}" + "_" + versionBanner())
}

fun versionBanner(): String {
val os = com.bmuschko.gradle.docker.shaded.org.apache.commons.io.output.ByteArrayOutputStream()
project.exec {
commandLine = "git rev-parse --verify --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}

// Config for gw run to be able to run this locally. Just execute gw run here on Intellij or on the console.
Expand Down
13 changes: 12 additions & 1 deletion hypertrace-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,21 @@ application {

hypertraceDocker {
defaultImage {
imageName.set("hypertrace")
imageName.set("hypertrace-service")
buildArgs.put("HYPERTRACE_UI_VERSION", hypertraceUiVersion)
dockerFile.set(file("Dockerfile"))
namespace.set("razorpay")
}
tag("${project.name}" + "_" + versionBanner())
}

fun versionBanner(): String {
val os = com.bmuschko.gradle.docker.shaded.org.apache.commons.io.output.ByteArrayOutputStream()
project.exec {
commandLine = "git rev-parse --verify --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}

// Config for gw run to be able to run this locally. Just execute gw run here on Intellij or on the console.
Expand Down