Skip to content

JAVA-5415: add artifact tracing on publish #1364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2024
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
40 changes: 40 additions & 0 deletions .evergreen/.evg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,40 @@ functions:

MONGODB_URI="${MONGODB_URI}" JAVA_VERSION="${JAVA_VERSION}" .evergreen/run-csfle-tests-with-mongocryptd.sh

"trace artifacts":
- command: shell.exec
params:
working_dir: "src"
script: |
tag=$(git describe --tags --always --dirty)

# remove the leading 'r'
version=$(echo -n "$tag" | cut -c 2-)

cat <<EOT > trace-expansions.yml
release_version: "$version"
EOT
cat trace-expansions.yml
- command: expansions.update
params:
file: src/trace-expansions.yml
- command: papertrail.trace
params:
key_id: ${papertrail_key_id}
secret_key: ${papertrail_secret_key}
product: ${product}
version: ${release_version}
filenames:
- "src/build/repo/org/mongodb/*/*/*.jar"
- "src/build/repo/org/mongodb/*/*/*.pom"
- "src/build/repo/org/mongodb/*/*/*.asc"
- "src/build/repo/org/mongodb/*/*/*.jar.md5"
- "src/build/repo/org/mongodb/*/*/*.pom.md5"
- "src/build/repo/org/mongodb/*/*/*.asc.md5"
- "src/build/repo/org/mongodb/*/*/*.jar.sha1"
- "src/build/repo/org/mongodb/*/*/*.pom.sha1"
- "src/build/repo/org/mongodb/*/*/*.asc.sha1"

"publish snapshot":
- command: shell.exec
type: test
Expand Down Expand Up @@ -1491,11 +1525,17 @@ tasks:
name: "static-analysis"
commands:
- func: "publish snapshot"
- func: "trace artifacts"
vars:
product: mongo-java-driver-snapshot

- name: publish-release
git_tag_only: true
commands:
- func: "publish release"
- func: "trace artifacts"
vars:
product: mongo-java-driver

- name: "perf"
tags: ["perf"]
Expand Down
4 changes: 4 additions & 0 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ ext {
password project.hasProperty('nexusPassword') ? project.getProperty('nexusPassword') : ''
}
}

maven {
url = "$rootDir/build/repo"
}
}
}
configureJarManifestAttributes = { project ->
Expand Down