Skip to content

Commit

Permalink
Add mage files for changelog
Browse files Browse the repository at this point in the history
Signed-off-by: James Strong <[email protected]>
  • Loading branch information
strongjz committed Jan 19, 2023
1 parent ef5bf06 commit 2a9e420
Show file tree
Hide file tree
Showing 21 changed files with 1,650 additions and 21 deletions.
15 changes: 15 additions & 0 deletions Changelog.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

### {{ .Version }}
Images:
{{ with .ControllerImages }}
{{ range . }} * {{ .Registry }}/{{ .Name }}:{{ .Tag}}@{{ .Digest }}
{{ end }} {{ end }}
### All Changes:
{{ with .Updates }}
{{ range . }}* {{ . }}
{{ end }}{{ end }}
### Dependencies updates: {{ with .DepUpdates }}
{{ range . }}* {{ . }}
{{ end }} {{ end }}
**Full Changelog**: https://github.com/kubernetes/ingress-nginx/compare/controller-{{ .PreviousControllerVersion }}...controller-{{ .NewControllerVersion }}
10 changes: 5 additions & 5 deletions RELEASE.md → MANUAL_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ Promoting the images basically means that images, that were pushed to staging co

- Fork that other project (if you don't have a fork already).

- Other project to fork [Github repo kubernetes/k8s.io](http://github.com/kubernetes/k8s.io)
- Other project to fork [GitHub repo kubernetes/k8s.io](http://github.com/kubernetes/k8s.io)

- Fetch --all and rebase to upstream if already forked.

- Create a branch in your fork, named as the issue number for this release

- In the related branch, of your fork, edit the file /registry.k8s.io/images/k8s-staging-ingress-nginx/images.yaml.

- For making it easier, you can edit your branch directly in the browser. But be careful about making any mistake.
- For making, it easier, you can edit your branch directly in the browser. But be careful about making any mistake.

- Insert the sha(s) & the tag(s), in a new line, in this file [Project kubernetes/k8s.io Ingress-Nginx-Controller Images](https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-ingress-nginx/images.yaml) Look at this [example PR and the diff](https://github.com/kubernetes/k8s.io/pull/2536) to see how it was done before

Expand All @@ -132,7 +132,7 @@ Promoting the images basically means that images, that were pushed to staging co

- Make sure to get the tag and sha of the promoted image from the step before, either from cloudbuild or from [here](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/ingress-nginx/controller).

- This involves editing of several different files. So carefully follow the steps below and double check all changes with diff/grep etc., repeatedly. Mistakes here impact endusers.
- This involves editing of several files. So carefully follow the steps below and double check all changes with diff/grep etc., repeatedly. Mistakes here impact endusers.

### a. Make sure your git workspace is ready

Expand Down Expand Up @@ -160,15 +160,15 @@ Promoting the images basically means that images, that were pushed to staging co
- [TAG](https://github.com/kubernetes/ingress-nginx/blob/main/TAG#L1)

### c. Edit the helm Chart
- Change the below mentioned [Fields in Chart.yaml](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/Chart.yaml)
- Change the below-mentioned [Fields in Chart.yaml](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/Chart.yaml)
- version
- appVersion
- kubeVersion (**ONLY if applicable**)
- annotations
- artifacthub.io/prerelease: "true"
- artifacthub.io/changes: |
- Replace this line and other lines under this annotation with the Changelog. One process to generate the Changelog is described below
- Install and configure github cli as per the docs of gh-cli https://cli.github.com/,
- Install and configure GitHub cli as per the docs of gh-cli https://cli.github.com/,
- Change dir to your clone, of your fork, of the ingress-nginx project
- Run the below command and save the output to a txt file

Expand Down
9 changes: 9 additions & 0 deletions NEW_RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Semi-Automated Release Process

1. Update TAG
2. Cloud Build
3. k8s.io PR
4. git pull origin main
5. git checkout -b $RELEASE_VERSION
6. mage release:newrelease $RELEASE_VERSION
7. Wait for PR
2 changes: 1 addition & 1 deletion TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.6.0
v1.6.0
36 changes: 36 additions & 0 deletions changelog/Changelog-1.5.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 1.5.2
Images:

<<<<<<< HEAD
* registry.k8s.io/ingress-nginx/controller:controller-v1.5.2@sha256:3870522ed937c9efb94bfa31a7eb16009831567a0d4cbe01846fc5486d622655
* registry.k8s.io/ingress-nginx/controller-chroot:controller-v1.5.2@sha256:84613555694f2c59a8b2551126d226c9aa648544ebf0cde1e0df942f7dbce42b

Expand All @@ -19,6 +20,24 @@ Images:
* update the nginx run container for alpine:3.17.0 (#9430)
* cleanup: remove ioutil for new go version (#9427)
* start upgrade to golang 1.19.4 and alpine 3.17.0 (#9417)
=======
* registry.k8s.io/controller:controller-v1.5.2@sha256:c1c091b88a6c936a83bd7g098v62f60a87868d12452529bad0d178fb36143346
* registry.k8s.io/controller-chroot:controller-v1.5.2@sha256:c1c091b88a6c936a83bd7b098662760a87868d12452529b350d178fb36147345

### All Changes:

<<<<<<< HEAD
>>>>>>> f4164ae0b (THE CHANGELOG WORKS)
=======
* upgrade nginx base image (#9436)
* test the new e2e test images (#9444)
* avoid builds and tests for non-code changes (#9392)
* CI updates (#9440)
* HPA: Add `controller.autoscaling.annotations` to `values.yaml`. (#9253)
* update the nginx run container for alpine:3.17.0 (#9430)
* cleanup: remove ioutil for new go version (#9427)
* start upgrade to golang 1.19.4 and alpine 3.17.0 (#9417)
>>>>>>> 9ecab7d85 (e2e doc updates work now)
* ci: remove setup-helm step (#9404)
* ci: remove setup-kind step (#9401)
* Add reporter for all tests (#9395)
Expand Down Expand Up @@ -54,6 +73,10 @@ Images:
* add containerSecurityContext to extraModules init containers (kubernetes#9016) (#9242)

### Dependencies updates:
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 9ecab7d85 (e2e doc updates work now)
* Bump golang.org/x/crypto from 0.3.0 to 0.4.0 (#9397)
* Bump github.com/onsi/ginkgo/v2 from 2.6.0 to 2.6.1 (#9432)
* Bump github.com/onsi/ginkgo/v2 from 2.6.0 to 2.6.1 (#9421)
Expand All @@ -62,6 +85,11 @@ Images:
* Bump goreleaser/goreleaser-action from 3.2.0 to 4.1.0 (#9426)
* Bump actions/dependency-review-action from 3.0.1 to 3.0.2 (#9424)
* Bump ossf/scorecard-action from 2.0.6 to 2.1.0 (#9422)
<<<<<<< HEAD
=======
>>>>>>> f4164ae0b (THE CHANGELOG WORKS)
=======
>>>>>>> 9ecab7d85 (e2e doc updates work now)
* Bump github.com/prometheus/common from 0.37.0 to 0.39.0 (#9416)
* Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0 (#9408)
* Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0 (#9398)
Expand All @@ -76,4 +104,12 @@ Images:
* Bump actions/dependency-review-action from 2.5.1 to 3.0.0 (#9301)
* Bump k8s.io/component-base from 0.25.3 to 0.25.4 (#9300)

<<<<<<< HEAD
<<<<<<< HEAD
**Full Changelog**: https://github.com/kubernetes/ingress-nginx/compare/controller-controller-v1.5.1...controller-controller-v1.5.2
=======
**Full Changelog**: https://github.com/kubernetes/ingress-nginx/compare/controller-controller-v1.5.2...controller-controller-v1.5.1
>>>>>>> f4164ae0b (THE CHANGELOG WORKS)
=======
**Full Changelog**: https://github.com/kubernetes/ingress-nginx/compare/controller-controller-v1.5.1...controller-controller-v1.5.2
>>>>>>> 9ecab7d85 (e2e doc updates work now)
Empty file.
12 changes: 12 additions & 0 deletions charts/ingress-nginx/changelog/Changelog-1.5.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

This file documents all notable changes to [ingress-nginx](https://github.com/kubernetes/ingress-nginx) Helm Chart. The release numbering uses [semantic versioning](http://semver.org).

### 4.4.1

* ci: remove setup-helm step (#9404)
* feat(helm): Optionally use cert-manager instead admission patch (#9279)
* run helm release on main only and when the chart/value changes only (#9290)
* Update Ingress-Nginx version controller-v1.5.2

**Full Changelog**: https://github.com/kubernetes/ingress-nginx/compare/helm-chart-4.4.1...helm-chart-4.4.1
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ require (
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/magefile/mage v1.14.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
Expand Down
15 changes: 0 additions & 15 deletions hack/changelog.sh

This file was deleted.

68 changes: 68 additions & 0 deletions ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
CURRENT_VERSION: "v1.5.1"
GOLANG_VERSION: "1.19.2"
GIT_TAG: "controller-v1.5.1"
NGINX_BASE_IMAGE: "registry.k8s.io/ingress-nginx/nginx:0b5e0685112e4537ee20a0bdbba451e9f6158aa3@sha256:3f5e28bb248d5170e77b77fc2a1a385724aeff41a0b34b5afad7dd9cf93de000"
NGINX_VERSION: "1.21.6"
VERSION_TABLE:
- "v1.5.1":
- Alpine: "3.16.2"
- Kubernetes: ["1.25","1.24","1.23"]
- NGINX: "1.21.6"
- CONTROLLER_IMAGE: "registry.k8s.io/ingress-nginx/controller:v1.5.1@sha256:4ba73c697770664c1e00e9f968de14e08f606ff961c76e5d7033a4a9c593c629"
- CHROOT_CONTROLLER_IMAGE: "registry.k8s.io/ingress-nginx/controller-chroot:v1.5.1@sha256:c1c091b88a6c936a83bd7b098662760a87868d12452529bad0d178fb36147345"
- "v1.4.0":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.3.1":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.3.0":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.2.1":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.1.3":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.1.2":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.1.1":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.1.0":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.5":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.4":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.3":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.2":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.1":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
- "v1.0.0":
- Alpine: "3.16.2"
- Kubernetes: [ "1.24","1.23", "1.22", "1.21", "1.20" ]
- NGINX: "1.19.10"
66 changes: 66 additions & 0 deletions magefiles/common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
//go:build mage

package main

import (
"fmt"
"os"
"strings"
"time"
)

var DEBUG bool

func init() {
DEBUG = false
debugENV := os.Getenv("MAGE_DEBUG")
if debugENV == "true" {
DEBUG = true
}
}

// CheckArgs should be used to ensure the right command line arguments are
// passed before executing an example.
func CheckArgs(arg ...string) {
if len(os.Args) < len(arg)+1 {
ErrorF("Usage: %s %s", os.Args[0], strings.Join(arg, " "))
os.Exit(1)
}
}

// CheckIfError should be used to naively panics if an error is not nil.
func CheckIfError(err error, format string, args ...interface{}) {
if err == nil {
return
}

fmt.Printf("\x1b[31;1m%s ERROR %s %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...), err)
os.Exit(1)
}

// Info should be used to describe the example commands that are about to run.
func Info(format string, args ...interface{}) {
fmt.Printf("\x1b[34;1m%s INFO: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
}

func timeStamp() string {
t := time.Now()
return t.Format(time.RFC3339)
}

// Warning should be used to display a warning
func Warning(format string, args ...interface{}) {
fmt.Printf("\x1b[36;1m%s WARNING: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
}

// Info should be used to describe the example commands that are about to run.
func Debug(format string, args ...interface{}) {
if DEBUG {
fmt.Printf("\x1b[34;1m%s DEBUG: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
}
}

// Info should be used to describe the example commands that are about to run.
func ErrorF(format string, args ...interface{}) {
fmt.Printf("\x1b[31;1m%s ERROR: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
}
3 changes: 3 additions & 0 deletions magefiles/docker.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//go:build mage

package main
15 changes: 15 additions & 0 deletions magefiles/go.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//go:build mage

package main

//import (
// "github.com/magefile/mage/mg"
// "github.com/mysteriumnetwork/go-ci/commands"
//)
//
//type Go mg.Namespace
//
//// Checks for issues with go imports
//func (Go) CheckGoImports() error {
// return commands.GoImports("./...")
//}
32 changes: 32 additions & 0 deletions magefiles/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module github.com/kubernetes/ingress-nginx/magefiles

go 1.19

require (
github.com/blang/semver/v4 v4.0.0
github.com/google/go-github/v48 v48.2.0
github.com/helm/helm v2.17.0+incompatible
github.com/magefile/mage v1.14.0
github.com/vmware-labs/yaml-jsonpath v0.3.2
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/apimachinery v0.25.4 // indirect
k8s.io/helm v2.17.0+incompatible // indirect
)
Loading

0 comments on commit 2a9e420

Please sign in to comment.