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

Switch CD to GitHub Actions #180

Merged
merged 8 commits into from
Mar 25, 2021
Merged

Conversation

simonbasle
Copy link
Member

This commit switches the CD to GitHub Actions, with a few adjustments:

  • CI is now only run on pull requests (ci.yml)
  • Pushes to master trigger the snapshot.yml worflow which runs tests
    in one job then publishes to Artifactory /libs-snapshot-local in a
    second job
  • Publishing a GitHub Release or PreRelease triggers release.yml
    • the tag is used as the version, so it must end with .RELEASE or
      represent a pre-release and include .RC or .M (this is added as a
      condition to the publishing jobs)
    • tests are not run, as it is assumed that snapshot tests have been
      verified by the maintainer who triggers the release
    • prereleases go to Artifactory /libs-milestone-local
    • GA releases still go to Bintray for now

Segregation of deployments into two jobs allow to use an environment and
thus properly gate access to secrets. It also gives an opportunity to
avoid all 3rd party actions in the critical parts of the workflow.

Fixes #159.

This commit switches the CD to GitHub Actions, with a few adjustments:

 - CI is now only run on pull requests (ci.yml)
 - Pushes to master trigger the `snapshot.yml` worflow which runs tests
 in one job then publishes to Artifactory /libs-snapshot-local in a
 second job
 - Publishing a GitHub Release or PreRelease triggers `release.yml`
   - the tag is used as the `version`, so it must end with .RELEASE or
   represent a pre-release and include .RC or .M (this is added as a
   condition to the publishing jobs)
   - tests are not run, as it is assumed that snapshot tests have been
   verified by the maintainer who triggers the release
   - prereleases go to Artifactory /libs-milestone-local
   - GA releases still go to Bintray for now

Segregation of deployments into two jobs allow to use an environment and
thus properly gate access to secrets. It also gives an opportunity to
avoid all 3rd party actions in the critical parts of the workflow.

Fixes #159.
@simonbasle simonbasle added the type/chore A task not related to code (build, formatting, process, ...) label Mar 25, 2021
@simonbasle
Copy link
Member Author

Some caveats of the previous CI/CD and release process listed while working on this PR:

  • the version is NOT defined in gradle build files but rather defined at CD time in the script(s)
  • tags are made without a v prefix (important, as they're used as the version for a given release)
  • doesn't follow the calver scheme (important, as .RELEASE suffix is used to determine a release vs a milestone vs a snapshot)
  • publish doesn't trigger tests
  • tests must be run with JDK10+ due to examples
  • snapshoting on azure pipelines run with JDK11 configured for Gradle, but the target and source versions are still Java 8 anyway

…s required

(since environment protection rules drive the manual approval, and we
only want that control on milestones/releases)
@simonbasle simonbasle self-assigned this Mar 25, 2021
@simonbasle simonbasle requested a review from a team March 25, 2021 12:42
Copy link
Contributor

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

added a minor clarification

Co-authored-by: Sergei Egorov <segorov@vmware.com>
@simonbasle
Copy link
Member Author

The snapshot environment has been prepared, so merging this should trigger a snapshot deployment.

@simonbasle simonbasle merged commit 781bf0f into master Mar 25, 2021
@simonbasle simonbasle deleted the 159-migrateToGhaIncludingSnapshots branch March 25, 2021 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate release to GitHub Actions
3 participants