Skip to content

Commit

Permalink
Merge pull request #95 from phisco/sync-upstream-master
Browse files Browse the repository at this point in the history
  • Loading branch information
phisco authored Jun 27, 2023
2 parents d8a1265 + 0a1330b commit 7fd09b3
Show file tree
Hide file tree
Showing 145 changed files with 5,484 additions and 2,940 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/patch_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ examples of each step, assuming vX.Y.Z is being cut.
- [ ] `xp/getting-started-with-gcp`
- [ ] Run the [Promote workflow][promote-workflow] with channel `stable` on the `release-X.Y` branch and verified that the tagged build version exists on the [releases.crossplane.io] `stable` channel at `stable/vX.Y.Z/...`.
- [ ] Published a [new release] for the tagged version, with the same name as the version and descriptive release notes, taking care of generating the changes list selecting as "Previous tag" `vX.Y.<Z-1>`, so the previous patch release for the same minor.
- [ ] Only if cutting a patch for the latest supported release: updated the [`crossplane/test` repo test workflows][crossplane-test-workflows] to ensure the checkout release branch and helm install version(s) point at the new release across all the workflow files.
- [ ] Ensured that users have been notified of the release on all communication channels:
- [ ] Slack: `#announcements` channel on Crossplane's Slack workspace.
- [ ] Twitter: reach out to a Crossplane maintainer or steering committee member, see [OWNERS.md][owners].

<!-- Named Links -->
[ci-workflow]: https://github.com/crossplane/crossplane/actions/workflows/ci.yml
[configurations-workflow]: https://github.com/crossplane/crossplane/actions/workflows/configurations.yml
[crossplane-test-workflows]: https://github.com/crossplane/test/tree/master/.github/workflows
[new release]: https://github.com/crossplane/crossplane/releases/new
[owners]: https://github.com/crossplane/crossplane/blob/master/OWNERS.md
[promote-workflow]: https://github.com/crossplane/crossplane/actions/workflows/promote.yml
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ examples of each step, assuming release vX.Y.0 is being cut.
- [ ] Updated, in a single PR, the following on `master`:
- [ ] The [releases table] in the `README.md`, removing the now old unsupported release and adding the new one.
- [ ] The `baseBranches` list in `.github/renovate.json5`, removing the now old unsupported release and adding the new one.
- [ ] Updated the [`crossplane/test` repo test workflows][crossplane-test-workflows] to ensure the checkout release branch and helm install version(s) point at the new release across all the workflow files.
- [ ] Ensured that users have been notified of the release on all communication channels:
- [ ] Slack: `#announcements` channel on Crossplane's Slack workspace.
- [ ] Twitter: reach out to a Crossplane maintainer or steering committee member, see [OWNERS.md][owners].
Expand All @@ -50,7 +49,6 @@ examples of each step, assuming release vX.Y.0 is being cut.
[Code Freeze]: https://docs.crossplane.io/knowledge-base/guides/release-cycle/#code-freeze
[ci-workflow]: https://github.com/crossplane/crossplane/actions/workflows/ci.yml
[configurations-workflow]: https://github.com/crossplane/crossplane/actions/workflows/configurations.yml
[crossplane-test-workflows]: https://github.com/crossplane/test/tree/master/.github/workflows
[docs release issue]: https://github.com/crossplane/docs/issues/new?assignees=&labels=release&template=new_release.md&title=Release+Crossplane+version...+
[new release]: https://github.com/crossplane/crossplane/releases/new
[owners]: https://github.com/crossplane/crossplane/blob/master/OWNERS.md
Expand Down
25 changes: 10 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,23 @@ you need any help contributing.
### Description of your changes

<!--
Briefly describe what this pull request does. Be sure to direct your reviewers'
attention to anything that needs special consideration.
Briefly describe what this pull request does, and how it is covered by tests.
Be proactive - direct your reviewers' attention to anything that needs special
consideration.
We love pull requests that resolve an open Crossplane issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":
You MUST either [x] check or ~strikethrough~ every item in the checklist below.
We love pull requests that fix an open issue. If yours does, use the below line
to indicate which issue it fixes, for example "Fixes #500".
-->
Fixes #

Fixes #

I have:

- [ ] Read and followed Crossplane's [contribution process].
- [ ] Added or updated unit **and** E2E tests for my change.
- [ ] Run `make reviewable` to ensure this PR is ready for review.
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.

### How has this code been tested

<!--
Before reviewers can be confident in the correctness of this pull request, it
needs to tested and shown to be correct. Briefly describe the testing that has
already been done or which is planned for this change.
-->

[contribution process]: https://git.io/fj2m9
[contribution process]: https://git.io/fj2m9
71 changes: 25 additions & 46 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:base",
"helpers:pinGitHubActionDigests"
],
// We only want renovate to rebase PRs when they have conflicts,
// default "auto" mode is not required.
Expand All @@ -20,18 +21,15 @@
"labels": ["automated"],
"regexManagers": [
{
// We want a PR to bump Go versions used through env variables in any Github
// Actions, taking it from the official Github repository.
"description": "Bump Go version used in workflows",
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$"],
"matchStrings": [
"GO_VERSION: '(?<currentValue>.*?)'\\n"
],
"datasourceTemplate": "golang-version",
"depNameTemplate": "golang"
}, {
// We want a PR to bump golangci-lint versions used through env variables in
// any Github Actions or Makefile, taking it from the official Github
// repository tags.
"description": "Bump golangci-lint version in workflows and the Makefile",
"fileMatch": ["^\\.github\\/workflows\\/[^/]+\\.ya?ml$","^Makefile$"],
"matchStrings": [
"GOLANGCI_VERSION: 'v(?<currentValue>.*?)'\\n",
Expand All @@ -41,19 +39,15 @@
"depNameTemplate": "golangci/golangci-lint",
"extractVersionTemplate": "^v(?<version>.*)$"
}, {
// We want a PR to bump the helm version used through env variables in
// any Github Actions or Makefile, taking it from the official Github
// repository tags.
"description": "Bump helm version in the Makefile",
"fileMatch": ["^Makefile$"],
"matchStrings": [
"HELM3_VERSION = (?<currentValue>.*?)\\n"
],
"datasourceTemplate": "github-tags",
"depNameTemplate": "helm/helm",
}, {
// We want a PR to bump the kind version used through env variables in
// any Github Actions or Makefile, taking it from the official Github
// repository tags.
"description": "Bump kind version in the Makefile",
"fileMatch": ["^Makefile$"],
"matchStrings": [
"KIND_VERSION = (?<currentValue>.*?)\\n"
Expand All @@ -66,23 +60,26 @@
"vulnerabilityAlerts": {
"enabled": true
},
"osvVulnerabilityAlerts": true,
// Renovate evaluates all packageRules in order, so low priority rules should
// be at the beginning, high priority at the end
"packageRules": [
// We don't want dependency updates which are not security related for
// release branches, except for docker images
{
"description": "Ignore non-security related updates to release branches",
matchBaseBranches: [ "/^release-.*/"],
enabled: false,
}, {
"description": "Still update Docker images on release branches though",
"matchDatasources": ["docker"],
matchBaseBranches: [ "/^release-.*/"],
enabled: true,
}, {
"description": "Only get Docker image updates every 2 weeks to reduce noise",
"matchDatasources": ["docker"],
"schedule": ["every 2 week on monday"],
enabled: true,
}, {
// We need to ignore k8s.io/client-go older versions as they switched to
// semantic version and old tags are still available in the repo.
"description": "Ignore k8s.io/client-go older versions, they switched to semantic version and old tags are still available in the repo",
"matchDatasources": [
"go"
],
Expand All @@ -91,44 +88,26 @@
],
"allowedVersions": "<1.0",
}, {
// We want a single PR for all bumps to Go dependencies, but only if there are
// known vulnerabilities in the current version. We need to ignore k8s related
// dependencies too as they should be first updated on crossplane-runtime.
"description": "Ignore k8s dependencies, should be updated on crossplane-runtime",
"matchDatasources": [
"go"
],
"matchPackagePatterns": [
"*"
"matchPackagePrefixes": [
"k8s.io",
"sigs.k8s.io"
],
"enabled": false,
"matchUpdateTypes": [
"major",
"minor",
"patch",
"digest"
],
"groupName": "all go dependencies"
}, {
// We want a single PR for all non-major bumps of Github Actions
"matchDepTypes": [
"action"
},{
"description": "Only get dependency digest updates every month to reduce noise",
"matchDatasources": [
"go"
],
"matchUpdateTypes": [
"minor",
"patch",
"digest"
"digest",
],
"groupName": "all non-major github action",
"pinDigests": true
},{
// We want dedicated PRs for each major bump to Github Actions
"matchDepTypes": [
"action"
],
"pinDigests": true
},{
// We disable updates actions for oss-fuzz, as it's not using tags, we'll just
// point to master branch
"extends": ["schedule:monthly"],
}, {
"description": "Ignore oss-fuzz, it's not using tags, we'll stick to master",
"matchDepTypes": [
"action"
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
if: github.event.pull_request.merged
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
fetch-depth: 0

- name: Open Backport PR
uses: zeebe-io/backport-action@b9f8a0a03e4697a60b4daa3a4b3bb054bf90c9bd # v1.3.0
uses: zeebe-io/backport-action@bf5fdd624b35f95d5b85991a728bd5744e8c6cf2 # v1.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
Expand Down
43 changes: 22 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.20.4'
GOLANGCI_VERSION: 'v1.52.2'
GO_VERSION: '1.20.5'
GOLANGCI_VERSION: 'v1.53.3'
DOCKER_BUILDX_VERSION: 'v0.10.0'

# Common users. We can't run a step 'if secrets.DOCKER_USR != ""' but we can run
Expand All @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
# this action because it leaves 'annotations' (i.e. it comments on PRs to
# point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3
with:
version: ${{ env.GOLANGCI_VERSION }}
skip-cache: true # We do our own caching.
Expand All @@ -125,7 +125,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -156,25 +156,25 @@ jobs:
run: make vendor vendor.check

- name: Initialize CodeQL
uses: github/codeql-action/init@0225834cc549ee0ca93cb085b92954821a145866 # v2
uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0225834cc549ee0ca93cb085b92954821a145866 # v2
uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2

trivy-scan-fs:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2 # 0.10.0
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # 0.11.2
with:
scan-type: 'fs'
ignore-unfixed: true
Expand All @@ -190,7 +190,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -236,21 +236,24 @@ jobs:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
area: [lifecycle, pkg, apiextensions]

steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
with:
platforms: all

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2
with:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -292,7 +295,7 @@ jobs:
BUILD_ARGS: "--load"

- name: Run E2E Tests
run: make e2e USE_HELM3=true
run: make e2e E2E_TEST_FLAGS="-test.v -labels area=${{ matrix.area }}"

publish-artifacts:
runs-on: ubuntu-22.04
Expand All @@ -301,18 +304,18 @@ jobs:

steps:
- name: Setup QEMU
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
with:
platforms: all

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # v2
with:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
submodules: true

Expand Down Expand Up @@ -359,7 +362,7 @@ jobs:
path: _output/**

- name: Login to DockerHub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
if: env.DOCKER_USR != ''
with:
username: ${{ secrets.DOCKER_USR }}
Expand Down Expand Up @@ -388,15 +391,13 @@ jobs:
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: "crossplane"
dry-run: true
language: go

- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: "crossplane"
fuzz-seconds: 300
dry-run: true
language: go

- name: Upload Crash
Expand Down
Loading

0 comments on commit 7fd09b3

Please sign in to comment.