-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Improve robustness of releases. Fixes #3004 #3009
Changes from all commits
5386505
6541499
019b886
159b351
f3e56aa
4ca31cb
ae0ff78
f79c9cf
d2585a2
e348794
26718cc
6eac62d
323b114
52e212e
3cff70e
67adc61
02111cb
10c2515
6633c60
4b43c9c
e067a1e
67094ec
45d171b
a2e12cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,7 @@ VERSION := latest | |
endif | ||
|
||
ifneq ($(findstring release,$(GIT_BRANCH)),) | ||
# this will be something like "v2.5" or "v3.7" | ||
MAJOR_MINOR := v$(word 2,$(subst -, ,$(GIT_BRANCH))) | ||
# if GIT_TAG is on HEAD, then this will be the same | ||
GIT_LATEST_TAG := $(shell git tag --merged | tail -n1) | ||
# only use the latest tag if it matches the correct major/minor version | ||
ifneq ($(findstring $(MAJOR_MINOR),$(GIT_LATEST_TAG)),) | ||
VERSION := $(GIT_LATEST_TAG) | ||
endif | ||
VERSION := $(shell git tag --points-at=HEAD|grep ^v|head -n1) | ||
endif | ||
|
||
# MANIFESTS_VERSION is the version to be used for files in manifests and should always be latests unles we are releasing | ||
|
@@ -78,7 +71,7 @@ CONTROLLER_IMAGE_FILE := dist/controller-image.$(VERSION) | |
STATIC_BUILD ?= true | ||
CI ?= false | ||
DB ?= postgres | ||
K3D := $(shell if [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi) | ||
K3D := $(shell if [ `which kubectl` <> '' ] && [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removes annoying |
||
# which components to start, useful if you want to disable them to debug | ||
COMPONENTS := controller,argo-server | ||
LOG_LEVEL := debug | ||
|
@@ -127,7 +120,7 @@ endef | |
define docker_build | ||
# If we're making a dev build, we build this locally (this will be faster due to existing Go build caches). | ||
if [ $(DEV_IMAGE) = true ]; then $(MAKE) dist/$(2)-$(OUTPUT_IMAGE_OS)-$(OUTPUT_IMAGE_ARCH) && mv dist/$(2)-$(OUTPUT_IMAGE_OS)-$(OUTPUT_IMAGE_ARCH) $(2); fi | ||
docker build $(DOCKER_BUILD_OPTS) -t $(IMAGE_NAMESPACE)/$(1):$(VERSION) --target $(1) -f $(DOCKERFILE) --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) . | ||
docker build --progress plain $(DOCKER_BUILD_OPTS) -t $(IMAGE_NAMESPACE)/$(1):$(VERSION) --target $(1) -f $(DOCKERFILE) --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "plain" shows more info and made issues easier to diagnose |
||
if [ $(DEV_IMAGE) = true ]; then mv $(2) dist/$(2)-$(OUTPUT_IMAGE_OS)-$(OUTPUT_IMAGE_ARCH); fi | ||
if [ $(K3D) = true ]; then k3d import-images $(IMAGE_NAMESPACE)/$(1):$(VERSION); fi | ||
touch $(3) | ||
|
@@ -152,7 +145,7 @@ ui/dist/node_modules.marker: ui/package.json ui/yarn.lock | |
# Get UI dependencies | ||
@mkdir -p ui/node_modules | ||
ifeq ($(CI),false) | ||
yarn --cwd ui install --frozen-lockfile --ignore-optional --non-interactive | ||
yarn --cwd ui install | ||
endif | ||
@mkdir -p ui/dist | ||
touch ui/dist/node_modules.marker | ||
|
@@ -167,8 +160,9 @@ else | |
endif | ||
|
||
$(GOPATH)/bin/staticfiles: | ||
# Install the "staticfiles" tool | ||
$(call backup_go_mod) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is what was making builds "dirty" |
||
go get bou.ke/staticfiles | ||
$(call restore_go_mod) | ||
|
||
server/static/files.go: $(GOPATH)/bin/staticfiles ui/dist/app/index.html | ||
# Pack UI into a Go file. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,27 @@ To generate new manifests and perform basic checks: | |
|
||
Publish the images and local Git changes (disabling K3D as this is faster and more reliable for releases): | ||
|
||
make publish-release K3D=false | ||
make publish-release K3D=false VERSION=v2.7.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. double check the version here |
||
|
||
* [ ] Check the images were pushed successfully. | ||
|
||
``` | ||
docker pull argoproj/workflow-controller:v2.7.2 | ||
docker pull argoproj/argoexec:v2.7.2 | ||
docker pull argoproj/argocli:v2.7.2 | ||
``` | ||
|
||
* [ ] Check the correct versions are printed: | ||
|
||
``` | ||
docker run argoproj/workflow-controller:v2.7.2 version | ||
docker run argoproj/argoexec:v2.7.2 version | ||
docker run argoproj/argocli:v2.7.2 version | ||
``` | ||
|
||
* [ ] Check the manifests contain the correct tags: https://raw.githubusercontent.com/argoproj/argo/v2.7.2/manifests/install.yaml | ||
|
||
### Release Notes | ||
|
||
Create [the release](https://github.com/argoproj/argo/releases) in Github. You can get some text for this using [Github Toolkit](https://github.com/alexec/github-toolkit): | ||
|
||
|
@@ -27,8 +47,28 @@ Release notes checklist: | |
* [ ] All breaking changes are listed with migration steps | ||
* [ ] The release notes identify every publicly known vulnerability with a CVE assignment | ||
|
||
### Update Stable Tag | ||
|
||
If this is GA: | ||
|
||
* [ ] Update the `stable` tag | ||
|
||
``` | ||
git tag -f stable | ||
git push -f origin stable | ||
``` | ||
|
||
* [ ] Check the manifests contain the correct tags: https://raw.githubusercontent.com/argoproj/argo/stable/manifests/install.yaml | ||
|
||
### Update Homebrew | ||
|
||
If this is GA: | ||
|
||
* [ ] Update the [Homebrew tap](https://github.com/argoproj/homebrew-tap). | ||
* [ ] Check Homebrew was successfully updated: | ||
|
||
``` | ||
brew upgrade argoproj/tap/argo | ||
argo version | ||
``` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
--add.ignore-optional true | ||
--install.ignore-optional true | ||
--install.frozen-lockfile true | ||
--install.non-interactive true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we make these the default options in the .yarnrc