Skip to content

Commit

Permalink
chore: automate release process
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Suen <[email protected]>
  • Loading branch information
jessesuen committed Apr 28, 2021
1 parent 304cb39 commit 804e7d1
Show file tree
Hide file tree
Showing 11 changed files with 276 additions and 124 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea/
.DS_Store
dist/
ui/dist/
*.iml
# delve debug binaries
cmd/**/debug
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- master
- release-*
tags:
- v*.*.*

# Run tests for any PRs.
pull_request:
Expand Down Expand Up @@ -58,7 +56,6 @@ jobs:
ghcr.io/argoproj/argo-rollouts
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Docker meta (plugin)
id: plugin-meta
Expand All @@ -69,7 +66,6 @@ jobs:
ghcr.io/argoproj/kubectl-argo-rollouts
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
# avoid building linux/arm64 for PRs since it takes so long
- name: Set Platform Matrix
Expand All @@ -81,16 +77,16 @@ jobs:
fi
echo "::set-output name=platform-matrix::$PLATFORM_MATRIX"
- name: Build and push (controller)
- name: Build and push (controller-image)
uses: docker/build-push-action@v2
with:
platforms: ${{ steps.platform-matrix.outputs.platform-matrix }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.controller-meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Build and push (plugin)
- name: Build and push (plugin-image)
uses: docker/build-push-action@v2
with:
target: kubectl-argo-rollouts
Expand Down
131 changes: 131 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Release

on:
workflow_dispatch:
inputs:
tag:
description: Git tag to build release from
required: true

jobs:
release-images:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Print Disk Usage
run: |
df -ah
docker buildx du
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Login to Quay.io
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v1
# with:
# registry: quay.io
# username: ${{ secrets.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Docker meta (controller)
id: controller-meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
quay.io/argoproj/argo-rollouts
ghcr.io/argoproj/argo-rollouts
tags: |
type=semver,pattern={{version}}
- name: Docker meta (plugin)
id: plugin-meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
quay.io/argoproj/kubectl-argo-rollouts
ghcr.io/argoproj/kubectl-argo-rollouts
tags: |
type=semver,pattern={{version}}
- name: Build and push (controller-image)
uses: docker/build-push-action@v2
with:
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
#push: true
push: false
tags: ${{ steps.controller-meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Build and push (plugin-image)
uses: docker/build-push-action@v2
with:
target: kubectl-argo-rollouts
#platforms: linux/amd64,linux/arm64
platforms: linux/amd64
#push: true
push: false
tags: ${{ steps.plugin-meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
release-artifacts:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}

- name: Generate release artifacts
run: |
make release-plugins
make manifests IMAGE_TAG=${{ github.event.inputs.tag }}
- name: Draft release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
draft: true
files: |
dist/kubectl-argo-rollouts-linux-amd64
dist/kubectl-argo-rollouts-darwin-amd64
manifests/install.yaml
manifests/namespace-install.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
# Changelog

# v1.0.0

## Notable Features
* New Argo Rollouts UI available in `kubectl argo rollouts dashboard`
* Support for Ambassador as a canary traffic router
* Support canarying using Istio DestinationRule subsets

## Upgrade Notes

### Installation Manifests

Installation manifests are now attached as GitHub Release artifacts (as opposed to raw files checked into git)
and can be installed with the release download URL. e.g.:

```
kubectl apply -f https://github.com/argoproj/argo-rollouts/releases/download/v1.0.0/install.yaml
```

### Argo CD OutOfSync status on Rollout v1.0.0 CRDs:

Argo Rollouts v1.0 now vends apiextensions.k8s.io/v1 CustomResourceDefinitions (previously apiextensions.k8s.io/v1beta1).
Kubernetes v1 CRDs no longer supports the preservation of unknown fields in objects, and rejects
attempts to set `spec.preserveUnknownFields: true`. In order to support a smooth upgrade from
Argo Rollouts v0.10 to v1.0, `spec.preserveUnknownFields` is explicitly set to `false` in the manifests,
despite `false` being the default, and only option in v1 CRDs. However this causes diffing tools
(such as Argo CD) to report the manifest as OutOfSync (since K8s drops the false field).

More information:
* https://github.com/kubernetes-sigs/controller-tools/issues/476
* https://github.com/argoproj/argo-rollouts/pull/1069

To avoid the Argo CD OutOfSync conditions, you can remove `spec.preserveUnknownFields` from the manifests
entirely *after upgrading from v0.10*.

## Changes since v0.10

### Controller
* feat: Implement Ambassador to be used as traffic router for canary deployments (#1025)
* feat: support canarying using Istio DestinationRule subsets (#985)
* feat: istio virtualservice and rollout in different namespaces
* feat: add ability to verify canary weights before advancing steps (#957)
* feat: support scaleDownDelaySeconds in canary w/ traffic routing (#1056)
* feat: Add ability to restart maxUnavailable pods to BlueGreen strategy (#937)
* feat(controller): Add support for ephemeral metadata on BlueGreen rollouts. Fixes #973 (#974)
* feat: Allow user to handle NaN result in Analysis (#977)
* feat: Wait for canary RS to have ready replicas before shifting labels (#1022)
* feat: Create RolloutPaused condition (#1054)
* feat: Add RolloutCompleted condition (#1074)
* fix: Fixes the regression of dropping resources from argo-rollouts crds. Fixes #1043 (#1044)
* fix: Set Canary Strategy default maxUnavailable to 25% (#981)
* fix: blue-green rollouts could pause prematurely during prePromotionAnalysis (#1007)
* fix: Clear ProgressDeadlineExceeded Condition in paused BlueGreen Rollout (#1002)
* fix: analysis template arguments validate (#1038)
* fix: calculate scale down count. (#1047)
* fix: verify analysis arguments name with those in the rollout (#1071)

### Analysis
* feat: metric fields can be parameterized by analysis arguments (#901)
* feat: support a custom base URL for the new relic provider (#1053)
* feat: Allow Datadog API and APP keys to be consumed from env vars (#1073)
* fix: Improve validation for AnalysisTemplates referenced by RO (#1094)
* fix: wavefront queries would return no datapoints. surface evaluate errors
* fix: metrics which errored did not retry at error interval

### Plugin
* feat: Argo Rollouts api-server and UI (#1015)
* feat: Implement rollout status command. Fixes #596 (#1001)
* fix: get rollout always return not found except default namespace (#961)
* fix: create command not support namespace in yaml file (#962)
* fix: kubectl argo create panic: runtime error: invalid memory address or nil pointer dereference

### Misc
* feat: support ARM builds, remove unused components in Dockerfile (#889)
* chore: update k8s dependencies to v1.20. improve logging (#994)
* fix: add informational exposed ports to deployment (#1066)


# v0.10.2

## Changes since v0.10.1
Expand Down
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ PATH := $(DIST_DIR):$(PATH)
PLUGIN_CLI_NAME?=kubectl-argo-rollouts
TEST_TARGET ?= ./...

VERSION=$(shell cat ${CURRENT_DIR}/VERSION)
BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_TAG=$(shell if [ -z "`git status --porcelain`" ]; then git describe --exact-match --tags HEAD 2>/dev/null; fi)
GIT_TREE_STATE=$(shell if [ -z "`git status --porcelain`" ]; then echo "clean" ; else echo "dirty"; fi)
GIT_REMOTE_REPO=upstream
VERSION=$(shell if [ ! -z "${GIT_TAG}" ] ; then echo "${GIT_TAG}" | sed -e "s/^v//" ; else cat VERSION ; fi)

# docker image publishing options
DOCKER_PUSH=false
IMAGE_TAG=latest
# build development images
DEV_IMAGE=false

Expand All @@ -25,18 +29,9 @@ override LDFLAGS += \
-X ${PACKAGE}/utils/version.gitCommit=${GIT_COMMIT} \
-X ${PACKAGE}/utils/version.gitTreeState=${GIT_TREE_STATE}

# docker image publishing options
DOCKER_PUSH=false
IMAGE_TAG=latest
ifneq (${GIT_TAG},)
IMAGE_TAG=${GIT_TAG}
LDFLAGS += -X ${PACKAGE}.gitTag=${GIT_TAG}
endif
ifneq (${IMAGE_NAMESPACE},)
override LDFLAGS += -X ${PACKAGE}/install.imageNamespace=${IMAGE_NAMESPACE}
endif
ifneq (${IMAGE_TAG},)
override LDFLAGS += -X ${PACKAGE}/install.imageTag=${IMAGE_TAG}
override LDFLAGS += -X ${PACKAGE}.gitTag=${GIT_TAG}
endif

ifeq (${DOCKER_PUSH},true)
Expand Down
85 changes: 0 additions & 85 deletions RELEASE.md

This file was deleted.

Loading

0 comments on commit 804e7d1

Please sign in to comment.