Fix signing on master

Also fix more docs with beta note and version.
This commit is contained in:
Tyler Benson 2017-07-19 08:01:40 -07:00
parent fedde1541b
commit 5167cd6916
6 changed files with 23 additions and 18 deletions

View File

@ -44,13 +44,14 @@ jobs:
name: Decode Signing Key
command: echo $PGP_KEY_FILE | base64 --decode > /home/circleci/dd-trace-java/.circleci/secring.gpg
- run:
name: Sign Archives
command: ./gradlew -Psigning.keyId=${PGP_KEY_ID} -Psigning.password=${PGP_KEY_PASS} -Psigning.secretKeyRingFile=/home/circleci/dd-trace-java/.circleci/secring.gpg signArchives
- deploy:
name: Publish master to Artifactory
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./gradlew -PbintrayUser=${BINTRAY_USER} -PbintrayApiKey=${BINTRAY_API_KEY} artifactoryPublish
./gradlew -Psigning.keyId=${PGP_KEY_ID} \
-Psigning.password=${PGP_KEY_PASS} \
-Psigning.secretKeyRingFile=/home/circleci/dd-trace-java/.circleci/secring.gpg \
-PbintrayUser=${BINTRAY_USER} \
-PbintrayApiKey=${BINTRAY_API_KEY} \
artifactoryPublish
fi

View File

@ -16,7 +16,7 @@ and configure them on-fly.
### Run the demo
1. Check prerequisites [here](../../../raclette-java-examples/README.md)
2. Run the application from your IDE using `-javaagent:path/to/opentracing-agent-x.y.z.jar`
2. Run the application from your IDE using `-javaagent:path/to/dd-java-agent.jar`
![](java-agent-ide.png)

View File

@ -26,9 +26,11 @@ docker run -it --rm -p 27017:27017 --name mongo -d mongo
If you want to enable tracing you have to launch the application with the Datadog java agent.
First, get the latest version of the dd-java-agent:
*NOTE:* While in beta, the latest version is best found on the [Snapshot Repo](https://oss.jfrog.org/artifactory/oss-snapshot-local/com/datadoghq/).
```
# Use latest version
curl -OL http://central.maven.org/maven2/com/datadoghq/dd-java-agent/{version}/dd-java-agent-{version}.jar
# download the latest published version:
wget -O dd-java-agent.jar 'https://search.maven.org/remote_content?g=com.datadoghq&a=dd-java-agent&v=LATEST'
```
@ -36,7 +38,7 @@ Then, build the app add the agent to the JVM. That can be done as follow:
```
cd path/to/dd-trace-examples/dropwizard-mongo-client
gradle clean shadowJar
java -javaagent:/path/to/dd-java-agent-{version}.jar -jar build/libs/dropwizard-mongo-client-{version}-all.jar server
java -javaagent:/path/to/dd-java-agent.jar -jar build/libs/dropwizard-mongo-client-demo-all.jar server
```
### Generate traces

View File

@ -5,6 +5,7 @@ plugins {
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
version = 'demo'
description = 'dropwizard-mongo-client'
dependencies {
@ -26,4 +27,4 @@ jar {
shadowJar {
mergeServiceFiles()
}
}

View File

@ -21,8 +21,6 @@ The demo consistes into a very simple backend backed by a MySQL db. The Spring B
#### Prerequisites
1. Run the latest version of Datadog Agent. For instance, you can run it through a docker container:
`docker run -d --name dd-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e API_KEY=<YOUR-API-KEY> -e SD_BACKEND=docker -p 8126:8126 -P datadog/docker-dd-agent:latest`
2. Run an instance of MyQSL. This could also be done using docker:
`docker run -dt --name mysql -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -e MYSQL_DATABASE=springdb mysql`
#### Run the application
@ -59,24 +57,25 @@ Then, is to run the Spring Application along the Datadog Java Agent.
- So first download the `jar` file from the main repository.
*NOTE:* While in beta, the latest version is best found on the [Snapshot Repo](https://oss.jfrog.org/artifactory/oss-snapshot-local/com/datadoghq/).
```
# use latest version
curl -OL http://central.maven.org/maven2/com/datadoghq/dd-java-agent/{version}/dd-java-agent-{version}.jar
# download the latest published version:
wget -O dd-java-agent.jar 'https://search.maven.org/remote_content?g=com.datadoghq&a=dd-java-agent&v=LATEST'
```
- Then add the following JVM argument when launching your application (in IDE, using Maven run or simply in collaboration with the `>java -jar` command):
```
-javaagent:/path/to/the/dd-java-agent-{version}.jar
-javaagent:/path/to/the/dd-java-agent.jar
```
- Finally, run the application through your IDE or Maven with the `javaagent` option.
```
mvn spring-boot:run -Djavaagent:/path/to/the/dd-java-agent-{version}.jar
mvn spring-boot:run -Djavaagent:/path/to/the/dd-java-agent.jar
```
### Generate traces
Once the application runs. Go to the following urls:
@ -111,4 +110,4 @@ and add `:tracing` right after the `jdbc` string as shown below.
```properties
spring.datasource.url= jdbc:tracing:mysql://localhost:3306/springdb
```
```

View File

@ -1,7 +1,9 @@
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
version = 'demo'
description = 'spring-boot-jdbc'
dependencies {
compile group: 'com.h2database', name: 'h2', version: '1.4.196'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.5.3.RELEASE'