TykTechnologies / tyk-operator

Tyk Operator for Kubernetes
https://tyk.io
Other
198 stars 40 forks source link

feat: Continuous delivery github actions #152

Closed asoorm closed 3 years ago

asoorm commented 4 years ago
Feature: Automatically build and publish latest & tag version bump versions based on SemVer
  In order for tyk-operator users to track latest or pin to a specific version of the operator
  As an operator developer
  When I merge to master
    I need to automatically tag the git repo as `latest` & bump the version
    And I need to publish a changelog and add that to the release notes in GitHub
    And the latest and versioned tag need to be pushed to DockerHub
  Scenario: Merge a pull request tagging
    Given I have a pull request
    When i merge to master
    Then github actions should automatically tag the master as latest
      And github actions should automatically bump the minor version `X.MINOR.X`
  Scenario: Merge a pull request with commit "#patch"
    Given I have a pull request
      And there is a commit message containing "#patch"
    When i merge to master
    Then github actions should automatically tag the master as latest
      And github actions should automatically bump the patch version "X.X.PATCH"
  Scenario: Merge a pull request with commit "#major"
    Given I have a pull request
      And there is a commit message containing "#major"
    When i merge to master
    Then github actions should automatically tag the master as latest
      And github actions should automatically bump the patch version "MAJOR.X.X"

--- DONE, But needs validation

  Scenario: Auto publish release notes
    Given I have a pull request
    When a release is tagged (latest or semver)
    Then A changelog will be generated from all the commits between this and the previous "latest" tag
      And this changelog will be published as release notes against the tag
  Scenario: Build and Publish to DockerHub
    Given I have a github repository
    When a release is tagged (latest or semver)
    Then github actions should build a docker image and push it to dockerhub
      And the docker image that has been pushed should have 2 tags; latest and the new github semver tag
alephnull commented 4 years ago

I'll take a stab at implementing this using goreleaser. Might have to tweak the commit tags to make it work.

asoorm commented 4 years ago

Thanks @alephnull - Just FYI - I've implemented basic goreleaser to build using Dockerfile, but it only builds when I push a tag manually.

If you could just validate my setup, and Maybe this is OK as per our discussions for time being.

alephnull commented 3 years ago

@asoorm The goreleaser stuff looks great.

Feature: Automatically build and publish latest & tag version bump versions based on SemVer Scenario: Merge a pull request with commit "#patch" [&c]

This is partially addressed. When the semver policy is established, we can stop having to tag versions by hand. I propose a policy based on branches like the rest of tyk. This is an attempt to work with current branching strategies that developers are familiar with and move to a state where we do not have to tag versions by hand.

Questions like

Scenario: Auto publish release notes

Should be easy to generate changelog and release notes when the semver policy is established.

Scenario: Build and Publish to DockerHub

I think this is done. For now at least.

asoorm commented 3 years ago

Thanks @alephnull closing & marking as Done.