-
Notifications
You must be signed in to change notification settings - Fork 844
Configure Dr Elephant to publish artifacts to Jfrog Bintray #680
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
Draft
saniyanajeeb
wants to merge
5
commits into
linkedin:tuning_20190221
Choose a base branch
from
saniyanajeeb:TOOLS-251167
base: tuning_20190221
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6457f66
Configure Dr Elephant to publish to bintray
saniyanajeeb f5026f1
indentation fix
saniyanajeeb 05e4c1e
Adding a script to automate build and publish
saniyanajeeb 25ff778
fix in build.sh to take values from env variables
saniyanajeeb 0301419
fix
saniyanajeeb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| BUILD_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
|
|
||
| # Enable analytics in the conf file. | ||
| sed -i.bak 's/^enable_analytics=false$/enable_analytics=true/' $BUILD_PATH/app-conf/elephant.conf | ||
| rm -rf "$BUILD_PATH"/app-conf/elephant.conf.bak | ||
|
|
||
| cd $BUILD_PATH/ | ||
|
|
||
|
|
||
| # Compile Dr Elephant code with the script provided. An optional conf file can be passed in. | ||
| if [ -z "$1" ]; | ||
| then | ||
| bash ./compile.sh | ||
| else | ||
| bash ./compile.sh $1 | ||
| fi | ||
|
|
||
| # Generate the pom file (other artifacts are disabled) and publish to bintray | ||
| sbt clean 'set publishArtifact in (Compile, packageBin) := false' 'set publishArtifact in (Compile, packageDoc) := false' 'set publishArtifact in (Compile, packageSrc) := false' publish | ||
|
|
||
| MODULE=dr-elephant_2.10 | ||
|
|
||
| VERSION=`sed -n 's/.*version := \"\([^"]*\)\".*/\1/p' $BUILD_PATH/build.sbt` | ||
|
|
||
| mv $BUILD_PATH/dist/dr-elephant*.zip $BUILD_PATH/dist/$MODULE-$VERSION.zip | ||
|
|
||
| cd dist/ | ||
|
|
||
| echo "Uploading the distribution to bintray" | ||
| curl -T $MODULE-"$VERSION".zip -u"$BINTRAY_USER":"$BINTRAY_PASS" https://api.bintray.com/content/linkedin/maven/dr-elephant/"$VERSION"/com/linkedin/drelephant/$MODULE/"$VERSION"/ --verbose | ||
|
|
||
| echo "Publishing the uploaded distribution" | ||
| curl -X POST -u"$BINTRAY_USER":"$BINTRAY_PASS" https://api.bintray.com/content/linkedin/maven/dr-elephant/"$VERSION"/publish --verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| /* | ||
| Paste the tracking javascript snippet into this file for web analytics. | ||
| This javascript file will be included into every page in the application. | ||
| See comments section above 'enable.analytics' in the application.conf file for | ||
| more information. | ||
| */ | ||
|
|
||
| // Piwik | ||
| var _paq = _paq || []; | ||
| _paq.push(['trackPageView']); | ||
| _paq.push(['enableLinkTracking']); | ||
| (function() { | ||
| var u="//piwik.corp.linkedin.com/piwik/"; | ||
| _paq.push(['setTrackerUrl', u+'piwik.php']); | ||
| _paq.push(['setSiteId', 86]); | ||
| var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
| g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); | ||
| })(); | ||
| // End Piwik Code | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The piwik.js file was being overwritten to this location (track.js) by Dr Elephant MP wrapper. Since the wrapper will be deprecated so adding this file as part of Dr Elephant source code itself.