Skip to content

Topology release version and change log #111

@serhiykrupka

Description

@serhiykrupka

Overview

Generate topology version/public version and changelog/release notes of environment during promotion.

With trunk-based development we can have N releases each day, but not every release will be promoted on PROD/live environment, for example, if we have one application and we produced 20 versions, and at some point of time we deiced release version v0.0.18 on PROD, we need produce new aggregated release notes with all included all app changes, starting from v.0.0.0 to 0.0.18, also mark topology with new release version/tag.
So, PMs or BAs will see whole changes which been deployed on PROD environment.

image
Source: https://whimsical.com/topology-verion-generation-NQjNpuBbsGjwyna4hZouMB

Implementation

  1. Contribute to sdlcctl
  2. Create new k8s CRD: TopologyRelease. see kubebuilder and sdlcctl
  3. Use k8s API to pull Release CRDs, check JX API
  4. Collect all commits/releases across all changed apps and versions (v1..v2)
  5. Generate aggregated release notes based on conventional commits choose one of available tools or try to reuse JX
  6. Mark env. with new tag release tag (v0.0.1-{env})

JX Release CRD example

apiVersion: jenkins.io/v1
kind: Release
metadata:
  creationTimestamp: "2021-03-11T14:02:28Z"
  name: 'moodfeed-api-0.0.1'
  namespace: jx-staging
  labels:
    gitops.jenkins-x.io/pipeline: 'namespaces'
spec:
  commits:
    - author:
        email: jenkins-x@googlegroups.com
        name: jenkins-x-bot
      branch: master
      committer:
        email: jenkins-x@googlegroups.com
        name: jenkins-x-bot
      message: |
        chore: release 0.0.1
      sha: 800ac9c3a76d4145465b70c521f3d4c7cfaa0cfc
    - author:
        email: jenkins-x@googlegroups.com
        name: root
      branch: master
      committer:
        email: jenkins-x@googlegroups.com
        name: root
      message: |
        chore: add variables
      sha: 226b79a0c970eaaea1b0c2c00f1c4878ab971462
  gitHttpUrl: https://github.com/vitech-team/moodfeed-api
  gitOwner: vitech-team
  gitRepository: moodfeed-api
  name: 'moodfeed-api'
  releaseNotesURL: https://github.com/vitech-team/moodfeed-api/releases/tag/v0.0.1
  version: v0.0.1

kubectl

➜  kubectl get releases -n jx-staging
NAME                 NAME           VERSION   GIT URL
jx-verify-0.0.70     jx-verify      0.0.70    https://github.com/jenkins-x/jx-verify
moodfeed-api-0.0.1   moodfeed-api   v0.0.1    https://github.com/vitech-team/moodfeed-api
moodfeed-ui-0.0.1    moodfeed-ui    v0.0.1    https://github.com/vitech-team/moodfeed-ui
moodfeed-ui-1.0.0    moodfeed-ui    v1.0.0    https://github.com/vitech-team/moodfeed-ui
moodfeed-ui-1.0.1    moodfeed-ui    v1.0.1    https://github.com/vitech-team/moodfeed-ui

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions