Skip to content
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

Enabled automated, sequenced releases from Travis CI #1387

Merged
merged 4 commits into from
Feb 21, 2020
Merged

Enabled automated, sequenced releases from Travis CI #1387

merged 4 commits into from
Feb 21, 2020

Conversation

mockitoguy
Copy link
Contributor

@mockitoguy mockitoguy commented Feb 14, 2020

The goal is to release automatically from Travis and enable convenient merging of PRs, even if many PRs are merged concurrently (bug in Shipkit Gradle plugin: mockito/shipkit#395).

Important Add 'GIT_SECRET' env variable in Travis UI in format: user:github_access_token, for example: mockitoguy:qq43234xc23x23d24d

More details:

  • instead of using Shipkit Gradle plugin we keep most CI/CD automation inside Ambry project. This way, it is easier to configure, debug and understand.
  • we're using a new Gradle plugin "shipkit-auto-version". This plugin automatically deducts the version based on the most recent tag and the "version.properties" file. It is a very simple plugin, keeps the build logic simple, and keeps the Ambry build easy to maintain in the future.

This PR removes following features (acceptable trade-offs, we can implement it in the future):

  • automated release notes generation

@mockitoguy mockitoguy changed the title Enabled continuous releases from Travis CI Enabled automated, sequenced releases from Travis CI Feb 14, 2020
@mockitoguy mockitoguy requested a review from cgtz February 14, 2020 21:55
Copy link
Contributor

@cgtz cgtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this, @mockitoguy! I just have a few small comments.
To clarify, the shipkit-auto-version plugin avoids tag conflicts by using the # of commits since the last tag to get the new version number?

gradle/git-push.sh Outdated Show resolved Hide resolved
gradle/ci-release.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
@mockitoguy
Copy link
Contributor Author

@cgtz, thank you for feedback! Resolving the comments now...

@mockitoguy
Copy link
Contributor Author

shipkit-auto-version plugin avoids tag conflicts by using the # of commits since the last tag to get the new version number?

Yes. It tries to count the merge commits in case the PR has many commits, to allow smaller increments. But generally, the core of the algorithm is counting commits.

@mockitoguy
Copy link
Contributor Author

@cgtz, updated per your feedback! Can you consider merging? Please expose GIT_SECRET env variable in Travis UI (see more in PR description). Thanks!

travis-build.sh Outdated
set -e

echo "Building and testing artifacts, and creating pom files"
./gradlew -s -i --scan build publishToMavenLocal codeCoverageReport
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the -i option from this command? Since we have logging enabled for our tests, this can produce a ton of output.
I think it should be okay to use -i on lines 10 and 17 though.

Our tests have noisy logging, and travis can't show all of the output.
@codecov-io
Copy link

Codecov Report

Merging #1387 into master will increase coverage by <.01%.
The diff coverage is 84.38%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1387      +/-   ##
============================================
+ Coverage     72.66%   72.66%   +<.01%     
- Complexity     6890     7007     +117     
============================================
  Files           498      507       +9     
  Lines         38925    39531     +606     
  Branches       4937     4999      +62     
============================================
+ Hits          28283    28724     +441     
- Misses         9294     9437     +143     
- Partials       1348     1370      +22
Impacted Files Coverage Δ Complexity Δ
...in/java/com.github.ambry.router/DeleteManager.java 85% <ø> (ø) 14 <0> (ø) ⬇️
...java/com.github.ambry.router/TtlUpdateManager.java 86.2% <ø> (ø) 15 <0> (ø) ⬇️
.../main/java/com.github.ambry.router/PutManager.java 87.09% <ø> (ø) 30 <0> (ø) ⬇️
...ain/java/com.github.ambry/config/RouterConfig.java 97.8% <ø> (ø) 1 <0> (ø) ⬇️
....github.ambry.clustermap/StaticClusterManager.java 71.02% <ø> (ø) 83 <0> (ø) ⬇️
...in/java/com.github.ambry.store/StorageManager.java 88.88% <ø> (ø) 54 <0> (ø) ⬇️
...ava/com.github.ambry/config/ReplicationConfig.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...in/java/com.github.ambry/config/NetworkConfig.java 100% <ø> (ø) 1 <0> (ø) ⬇️
.../main/java/com.github.ambry.router/GetManager.java 90.09% <ø> (ø) 24 <0> (ø) ⬇️
....github.ambry/tools/admin/AzureCompactionTool.java 0% <0%> (ø) 0 <0> (ø) ⬇️
... and 109 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4047cd1...017d055. Read the comment docs.

@cgtz cgtz merged commit 07b00a9 into linkedin:master Feb 21, 2020
cgtz added a commit to cgtz/ambry that referenced this pull request Feb 24, 2020
To support internal adapted gradle builds, we used to have a flag that
disables the release/publishing related gradle plugins,
"disableShipkit". This commit adds it back, as it got removed in
PR linkedin#1387.
lightningrob pushed a commit that referenced this pull request Feb 24, 2020
To support internal adapted gradle builds, we used to have a flag that
disables the release/publishing related gradle plugins,
"disableShipkit". This commit adds it back, as it got removed in
PR #1387.  Also add back testJar publishing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants