Skip to content

Commit

Permalink
Merge branch 'release-1.6' of https://github.com/argoproj/argo-rollouts
Browse files Browse the repository at this point in the history
… into release-1.6

# Conflicts:
#	.github/workflows/docker-publish.yml
#	.github/workflows/image-reuse.yaml
#	.github/workflows/release.yaml
#	go.mod
#	go.sum
#	manifests/crds/analysis-run-crd.yaml
#	manifests/crds/analysis-template-crd.yaml
#	manifests/crds/cluster-analysis-template-crd.yaml
#	manifests/crds/experiment-crd.yaml
#	manifests/crds/rollout-crd.yaml
#	manifests/install.yaml
#	rollout/controller.go
  • Loading branch information
pasha-codefresh committed Dec 5, 2023
2 parents 56f53d5 + 2184a07 commit 6a747dd
Show file tree
Hide file tree
Showing 203 changed files with 29,979 additions and 2,971 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''
Checklist:

* [ ] I've included steps to reproduce the bug.
* [ ] I've inclued the version of argo rollouts.
* [ ] I've included the version of argo rollouts.

**Describe the bug**

Expand Down Expand Up @@ -49,4 +49,4 @@ kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNA
<!-- Issue Author: Don't delete this message to encourage other users to support your issue! -->
**Message from the maintainers**:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
39 changes: 39 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Workflows

| Workflow | Description |
|---------------------|-----------------------------------------------------------------|
| changelog.yml | Updates changelog when a release is published |
| codeql.yaml | CodeQL analysis |
| docker-publish.yaml | Build container image for PR's & publish for push events |
| image-reuse.yaml | Build, push, and Sign container images |
| go.yaml | lint, build, codegen |
| pr-title-check.yaml | Lint PR for semantic information |
| init-release.yaml | Build manifests and version then create a PR for release branch |
| release.yaml | Build images, cli-binaries, provenances, and post actions |


# Reusable workflows

## image-reuse.yaml

- The resuable workflow can be used to publish or build images with multiple container registries(Quay,GHCR, dockerhub), and then sign them with cosign when an image is published.
- A GO version `must` be specified e.g. 1.19
- The image name for each registry *must* contain the tag. Note: multiple tags are allowed for each registry using a CSV type.
- Multiple platforms can be specified e.g. linux/amd64,linux/arm64
- Images are not published by default. A boolean value must be set to `true` to push images.
- An optional target can be specified.

| Inputs | Description | Type | Required | Defaults |
|-------------------|-------------------------------------|-------------|----------|-----------------|
| go-version | Version of Go to be used | string | true | none |
| quay_image_name | Full image name and tag | CSV, string | false | none |
| ghcr_image_name | Full image name and tag | CSV, string | false | none |
| docker_image_name | Full image name and tag | CSV, string | false | none |
| platforms | Platforms to build (linux/amd64) | CSV, string | false | linux/amd64 |
| push | Whether to push image/s to registry | boolean | false | false |
| target | Target build stage | string | false | none |

| Outputs | Description | Type |
|-------------|------------------------------------------|-------|
|image-digest | Image digest of image container created | string|

2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
./git-chglog --sort semver -o CHANGELOG.md v1.3.1..
rm git-chglog
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: update changelog
title: "docs: Update Changelog"
Expand Down
43 changes: 11 additions & 32 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker
on:
push:
branches:
# - master # commented due to Codefresh convention
- master
- release-*

# Run tests for any PRs.
Expand Down Expand Up @@ -31,49 +31,28 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
quay.io/codefresh/argo-rollouts
# ghcr.io/codefresh-io/argo-rollouts
quay.io/argoproj/argo-rollouts
tags: |
type=ref,event=branch
# commented due to Codefresh convention
# flavor: |
# latest=${{ github.ref == 'refs/heads/master' }}
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master'}}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
- name: Docker meta (plugin)
id: plugin-meta
uses: docker/metadata-action@v4
with:
images: |
quay.io/codefresh/kubectl-argo-rollouts
# ghcr.io/codefresh-io/kubectl-argo-rollouts
quay.io/argoproj/kubectl-argo-rollouts
tags: |
type=ref,event=branch
# commented due to Codefresh convention
# flavor: |
# latest=${{ github.ref == 'refs/heads/master' }}

# - 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@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
type=ref,event=branch,enable=${{ github.ref != 'refs/heads/master'}}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
# avoid building linux/arm64 for PRs since it takes so long
- name: Set Platform Matrix
id: platform-matrix
run: |
PLATFORM_MATRIX=linux/amd64
if [ ${{ github.event_name != 'pull_request' }} = true ]; then
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
then
PLATFORM_MATRIX=$PLATFORM_MATRIX,linux/arm64
fi
echo "platform-matrix=$PLATFORM_MATRIX" >> $GITHUB_OUTPUT
Expand All @@ -88,7 +67,7 @@ jobs:
with:
quay_image_name: ${{ needs.set-vars.outputs.controller-meta-tags }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: ${{ needs.set-vars.outputs.platforms }}
push: ${{ github.event_name != 'pull_request' }}
secrets:
Expand All @@ -105,7 +84,7 @@ jobs:
with:
quay_image_name: ${{ needs.set-vars.outputs.plugin-meta-tags }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: ${{ needs.set-vars.outputs.platforms }}
push: ${{ github.event_name != 'pull_request' }}
target: kubectl-argo-rollouts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v4.1.0
with:
go-version: 1.19
go-version: '1.20'
- uses: actions/[email protected]
- name: Setup k3s
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
with:
python-version: 3.x
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v4.1.0
with:
go-version: 1.19
go-version: '1.20'
- name: build
run: |
pip install mkdocs mkdocs_material
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "master"
env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.19'
GOLANG_VERSION: '1.20'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -35,22 +35,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Checkout code
uses: actions/[email protected]
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.53.3
args: --timeout 6m
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
id: go
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
path: coverage.out

- name: Upload code coverage information to codecov.io
uses: codecov/[email protected].1
uses: codecov/[email protected].4
with:
file: coverage.out

Expand All @@ -102,7 +102,7 @@ jobs:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Golang
uses: actions/setup-go@v4
uses: actions/setup-go@v4.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
# k8s codegen generates files into GOPATH location instead of the GitHub git checkout location
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ jobs:
if: ${{ github.ref_type != 'tag'}}

- name: Setup Golang
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
uses: actions/setup-go@v4.1.0 # v3.5.0
with:
go-version: ${{ inputs.go-version }}

- name: Install cosign
uses: sigstore/cosign-installer@204a51a57a74d190b284a0ce69b44bc37201f343 # v3.0.3
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
with:
cosign-release: 'v2.0.2'
cosign-release: 'v2.2.0'

- uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
- uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
- uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1

- name: Setup tags for container image as a CSV type
run: |
Expand All @@ -106,31 +106,31 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
- name: Login to Quay.io
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: quay.io
username: ${{ secrets.quay_username }}
password: ${{ secrets.quay_password }}
if: ${{ inputs.quay_image_name && inputs.push }}

- name: Login to GitHub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ghcr.io
username: ${{ secrets.ghcr_username }}
password: ${{ secrets.ghcr_password }}
if: ${{ inputs.ghcr_image_name && inputs.push }}

- name: Login to dockerhub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
if: ${{ inputs.docker_image_name && inputs.push }}

- name: Build and push container image
id: image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 #v4.0.0
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 #v4.1.1
with:
context: .
platforms: ${{ inputs.platforms }}
Expand Down
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
formats: all
mkdocs:
fail_on_warning: false
python:
install:
- requirements: docs/requirements.txt
build:
os: "ubuntu-22.04"
tools:
python: "3.7"
7 changes: 0 additions & 7 deletions .readthedocs.yml

This file was deleted.

Loading

0 comments on commit 6a747dd

Please sign in to comment.