Skip to content

Commit 6aa8c7e

Browse files
first commit
0 parents  commit 6aa8c7e

File tree

371 files changed

+16302
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+16302
-0
lines changed

.circleci/config.yml

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
version: 2.1
2+
3+
orbs:
4+
codecov: codecov/codecov@1
5+
snyk: snyk/[email protected]
6+
7+
executors:
8+
java:
9+
docker:
10+
- image: cimg/openjdk:11.0
11+
helm:
12+
docker:
13+
- image: hypertrace/helm-gcs-packager:0.1.1
14+
commands:
15+
gradle:
16+
description: 'Run the provided gradle command'
17+
parameters:
18+
args:
19+
type: string
20+
when:
21+
default: "on_success"
22+
type: enum
23+
enum: ["on_fail", "on_success", "always"]
24+
steps:
25+
- run:
26+
name: << parameters.args >>
27+
command: ./gradlew << parameters.args >> --info --max-workers=2 -Dorg.gradle.jvmargs=-Xmx2g -Dorg.gradle.console=plain --continue
28+
when: << parameters.when >>
29+
update_submodules:
30+
description: 'Pull Submodules'
31+
steps:
32+
- run:
33+
name: Pull Submodules
34+
command: git submodule update --init
35+
- run:
36+
name: Ensure submodules point to commit from master branch
37+
command: git submodule foreach "git merge-base --is-ancestor HEAD origin/master"
38+
setup_build_environment:
39+
description: 'Generates cache key from a hash of all gradle files'
40+
steps:
41+
- checkout
42+
- update_submodules
43+
- run:
44+
name: Generate cache key
45+
command: find . -type f -name "*.gradle*" -exec shasum {} + | sort > /tmp/checksum.txt && cat /tmp/checksum.txt
46+
- restore_cache:
47+
keys:
48+
- v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
49+
# fallback to using the latest cache if no exact match is found
50+
- v1-dependencies-
51+
populate_and_save_cache:
52+
description: 'Downloads all gradle dependencies and uploads cache for later use'
53+
steps:
54+
- gradle:
55+
args: downloadDependencies
56+
- save_cache:
57+
paths:
58+
- ~/.gradle
59+
key: v1-dependencies-{{ checksum "/tmp/checksum.txt" }}
60+
61+
jobs:
62+
build:
63+
executor: java
64+
steps:
65+
- setup_build_environment
66+
- setup_remote_docker
67+
- populate_and_save_cache
68+
- gradle:
69+
args: build dockerBuildImages
70+
- gradle:
71+
args: jacocoTestReport
72+
- gradle:
73+
args: copyAllReports --output-dir=/tmp/test-reports
74+
when: always
75+
- codecov/upload
76+
- store_test_results:
77+
path: /tmp/test-reports
78+
- store_artifacts:
79+
path: /tmp/test-reports
80+
destination: reports
81+
snyk-scan:
82+
executor:
83+
name: java
84+
environment:
85+
GRADLE_OPTS: -Dorg.gradle.workers.max=1 # Snyk doesn't handle parallelism well
86+
steps:
87+
- setup_build_environment
88+
- snyk/scan:
89+
additional-arguments: --all-sub-projects
90+
publish:
91+
executor: java
92+
steps:
93+
- setup_build_environment
94+
- setup_remote_docker
95+
- gradle:
96+
args: :tag -Prelease
97+
- add_ssh_keys:
98+
fingerprints:
99+
- 'a1:99:97:65:ec:ff:20:cf:4e:7d:92:00:c0:be:63:c4'
100+
- run: git push origin $(./gradlew -q :printVersion)
101+
- gradle:
102+
args: dockerPushImages
103+
validate-charts:
104+
executor: helm
105+
steps:
106+
- checkout
107+
- run:
108+
name: Helm Charts Lint and Template Render
109+
command: |
110+
helm lint --strict ./helm/
111+
helm template ./helm/
112+
package-charts:
113+
executor: helm
114+
steps:
115+
- checkout
116+
- run:
117+
name: Package and Publish Helm Charts
118+
command: |
119+
CHART_VERSION=$(git describe --abbrev=0)
120+
CHART_NAME=$(awk '/^name:/ {print $2}' ./helm/Chart.yaml)
121+
export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/helm-gcs-key.json
122+
echo ${HELM_GCS_CREDENTIALS} > ${GOOGLE_APPLICATION_CREDENTIALS}
123+
helm dependency update ./helm/
124+
helm repo add helm-gcs ${HELM_GCS_REPOSITORY}
125+
helm package --version ${CHART_VERSION} --app-version ${CHART_VERSION} ./helm/
126+
helm gcs push ${CHART_NAME}-${CHART_VERSION}.tgz helm-gcs --public --retry
127+
workflows:
128+
version: 2
129+
build-and-publish:
130+
jobs:
131+
- build
132+
- validate-charts
133+
- snyk-scan:
134+
context: hypertrace-vulnerability-scanning
135+
- publish:
136+
context: hypertrace-publishing
137+
requires:
138+
- build
139+
- snyk-scan
140+
- validate-charts
141+
filters:
142+
branches:
143+
only:
144+
- master
145+
- package-charts:
146+
context: hypertrace-publishing
147+
requires:
148+
- publish
149+
filters:
150+
branches:
151+
only:
152+
- master

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Each line is a file pattern followed by one or more owners.
2+
3+
# global
4+
* @aaron-steinfeld @tim-mwangi

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
7+
.idea

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "hypertrace-core-graphql"]
2+
path = hypertrace-core-graphql
3+
url = [email protected]:hypertrace/hypertrace-core-graphql.git

LICENSE.md

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# PolyForm Strict License 1.0.0
2+
3+
<https://polyformproject.org/licenses/strict/1.0.0>
4+
5+
## Acceptance
6+
7+
In order to get any license under these terms, you must agree
8+
to them as both strict obligations and conditions to all
9+
your licenses.
10+
11+
## Copyright License
12+
13+
The licensor grants you a copyright license for the software
14+
to do everything you might do with the software that would
15+
otherwise infringe the licensor's copyright in it for any
16+
permitted purpose, other than distributing the software or
17+
making changes or new works based on the software.
18+
19+
## Patent License
20+
21+
The licensor grants you a patent license for the software that
22+
covers patent claims the licensor can license, or becomes able
23+
to license, that you would infringe by using the software.
24+
25+
## Noncommercial Purposes
26+
27+
Any noncommercial purpose is a permitted purpose.
28+
29+
## Personal Uses
30+
31+
Personal use for research, experiment, and testing for
32+
the benefit of public knowledge, personal study, private
33+
entertainment, hobby projects, amateur pursuits, or religious
34+
observance, without any anticipated commercial application,
35+
is use for a permitted purpose.
36+
37+
## Noncommercial Organizations
38+
39+
Use by any charitable organization, educational institution,
40+
public research organization, public safety or health
41+
organization, environmental protection organization,
42+
or government institution is use for a permitted purpose
43+
regardless of the source of funding or obligations resulting
44+
from the funding.
45+
46+
## Fair Use
47+
48+
You may have "fair use" rights for the software under the
49+
law. These terms do not limit them.
50+
51+
## No Other Rights
52+
53+
These terms do not allow you to sublicense or transfer any of
54+
your licenses to anyone else, or prevent the licensor from
55+
granting licenses to anyone else. These terms do not imply
56+
any other licenses.
57+
58+
## Patent Defense
59+
60+
If you make any written claim that the software infringes or
61+
contributes to infringement of any patent, your patent license
62+
for the software granted under these terms ends immediately. If
63+
your company makes such a claim, your patent license ends
64+
immediately for work on behalf of your company.
65+
66+
## Violations
67+
68+
The first time you are notified in writing that you have
69+
violated any of these terms, or done anything with the software
70+
not covered by your licenses, your licenses can nonetheless
71+
continue if you come into full compliance with these terms,
72+
and take practical steps to correct past violations, within
73+
32 days of receiving notice. Otherwise, all your licenses
74+
end immediately.
75+
76+
## No Liability
77+
78+
***As far as the law allows, the software comes as is, without
79+
any warranty or condition, and the licensor will not be liable
80+
to you for any damages arising out of these terms or the use
81+
or nature of the software, under any kind of legal claim.***
82+
83+
## Definitions
84+
85+
The **licensor** is the individual or entity offering these
86+
terms, and the **software** is the software the licensor makes
87+
available under these terms.
88+
89+
**You** refers to the individual or entity agreeing to these
90+
terms.
91+
92+
**Your company** is any legal entity, sole proprietorship,
93+
or other kind of organization that you work for, plus all
94+
organizations that have control over, are under the control of,
95+
or are under common control with that organization. **Control**
96+
means ownership of substantially all the assets of an entity,
97+
or the power to direct its management and policies by vote,
98+
contract, or otherwise. Control can be direct or indirect.
99+
100+
**Your licenses** are all the licenses granted to you for the
101+
software under these terms.
102+
103+
**Use** means anything you do with the software requiring one
104+
of your licenses.

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Hypertrace GraphQL
2+
3+
4+
## Testing
5+
6+
`./gradlew test`
7+
8+
## Running
9+
10+
`./gradlew run`
11+
12+
## Ports
13+
14+
GraphQL Service runs on port 23431 at `/graphql` by default
15+

build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugins {
2+
id("org.hypertrace.repository-plugin") version "0.2.0"
3+
id("org.hypertrace.ci-utils-plugin") version "0.1.1"
4+
id("org.hypertrace.jacoco-report-plugin") version "0.1.0" apply false
5+
id("org.hypertrace.docker-java-application-plugin") version "0.2.2" apply false
6+
id("org.hypertrace.docker-publish-plugin") version "0.2.2" apply false
7+
}
8+
9+
subprojects {
10+
group = "org.hypertrace.graphql"
11+
}

gradle.properties

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
org.gradle.parallel=true
2+
org.gradle.daemon=true
3+
org.gradle.caching=true
4+
org.gradle.configureondemand=true
5+

gradle/wrapper/gradle-wrapper.jar

57.3 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)