Skip to content

Instantly share code, notes, and snippets.

@mstachniuk
Created September 8, 2018 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstachniuk/3cccbb2a501bab0d89f8db6af544a51d to your computer and use it in GitHub Desktop.
Save mstachniuk/3cccbb2a501bab0d89f8db6af544a51d to your computer and use it in GitHub Desktop.
object Travis Gradle Shipkit Git Bintray GitHub
Travis->Gradle: Run gradlew build
Gradle->Shipkit: task createDependencyInfoFile
Gradle->Shipkit: task generatePomFileForJavaLibraryPublication
Gradle->Shipkit: task publishJavaLibraryPublicationToMavenLocal
Gradle->Travis: Build successful
Travis->Gradle: Run gradlew ciPerformRelease
Gradle->Gradle: Run all depended tasks
Gradle->Shipkit: task identifyGitBranch
Shipkit->Git: read branch name
Git->Shipkit: current branch name
Shipkit->Gradle:
Gradle->Shipkit: task downloadPreviousReleaseArtifacts
Shipkit->Bintray: Download previous sources jar
note left of Bintray: Gradle plugins will be published to \n Gradle Plugin Portal instead of Bintray
Bintray->Shipkit: downloaded artifact
Shipkit->Gradle:
Gradle->Shipkit: task comparePublications
note right of Shipkit: - compare current dependencies with previous \n - compare current source jars with previous \n - store result into file
Shipkit->Gradle:
Gradle->Shipkit: task releaseNeeded
Shipkit->Shipkit: Check if env variable SKIP_RELEASE exist
Shipkit->Git: Check commit message
note right of Git: If PR merge commit message contains: \n - [ci skip-release] then skip release \n - [ci skip-compare-publications] then ignore comparison result
Git->Shipkit:
Shipkit->Travis: Check if build Pull Request
note right of Travis: Actually it checks if env \n variable TRAVIS_PULL_REQUEST exist
Travis->Shipkit:
Shipkit->Git: Check branch name
Git->Shipkit: Branch name
note right of Shipkit: Check if branch name match releaseBranchRegex \n (default: "master|release/.+")
note right of Shipkit: Check comparison results \n (if [ci skip-compare-publications] doesn't exist)
Shipkit->Gradle: Info is release needed or not
Gradle->Shipkit: task gitCheckout
Shipkit->Git: Checkout specific branch
note right of Git: CI server automatically checks out rev hash of the commit \n so all commits are lost. \n Shipkit needs them for version bumps and release notes. \n Execute e.g.: git checkout master
Git->Gradle:
Gradle->Shipkit: task gitUnshallow
Shipkit->Git: Get sufficient amount of commits
note right of Git: CI server performs the unshallow clone. \n We need a good number of commits to generate release notes for. \n Execute: git fetch --unshallow --tags
Git->Gradle:
Gradle->Shipkit: task setGitUserEmail
Shipkit->Git: Set locally Git user email
note right of Git: Execute: git config --local user.email <shipkit.org@gmail.com>
Git->Gradle:
Gradle->Shipkit: task setGitUserName
Shipkit->Git: Set locally Git user name
note right of Git: Execute: git config --local user.name shipkit-org
Git->Gradle:
Gradle->Shipkit: task bumpVersionFile
note right of Shipkit: Update values in version.properties
Shipkit->Gradle:
Gradle->Shipkit: task identifyGitBranch
Shipkit->Git: Read branch name
note right of Git: It's needed in some next tasks \n Execute: git rev-parse --abbrev-ref HEAD
Git->Gradle:
Gradle->Shipkit: task fetchContributors
Shipkit->GitHub: Fetching all GitHub contributors
GitHub->Gradle:
Gradle->Shipkit: task fetchReleaseNotes
Shipkit->Git: Fetch data about changes from the last release
note right of Git: Execute: git log --pretty=%ad --date=iso v0.0.1 -n 1 \n git fetch origin +refs/tags/v0.0.1:refs/tags/v0.0.1 \n git log v0.0.1..HEAD
Git->Shipkit:
Shipkit->GitHub: Get information about GitHub issues
GitHub->Gradle:
Gradle->Shipkit: task updateReleaseNotes
note right of Shipkit: Generate Release Notes
Shipkit->Gradle:
Gradle->Shipkit: task gitCommit
Shipkit->Git: Commit release notes and version.properties
Git->Gradle:
Gradle->Shipkit: task gitTag
Shipkit->Git: Create tag
note right of Git: Execute: git tag -a v0.0.2 -m Created new tag v0.0.2 [ci skip] \n [ci skip] for not triggering infinite build loop on CI
Git->Gradle:
Gradle->Shipkit: task gitPush
Shipkit->Git: Push commit and tag
note right of Git: GitHub write token is used here
Git->Gradle:
Gradle->Shipkit: task performGitPush
note right of Shipkit: This task only aggregate gitCommit, gitTag and gitPush tasks
Shipkit->Gradle:
Gradle->Shipkit: task bintrayUpload
Shipkit->Bintray: upload artifacts
Bintray->Gradle: Release shipped! Thank you for using Shipkit!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment