Skip to content

Commit

Permalink
Merge branch 'runatlantis:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
william-richard committed May 20, 2024
2 parents 348ff99 + 7e79f56 commit f33221f
Show file tree
Hide file tree
Showing 250 changed files with 5,388 additions and 5,659 deletions.
30 changes: 0 additions & 30 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
indent_style = space
indent_size = 3
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ provider/gitlab:

website:
- changed-files:
- any-glob-to-any-file: 'runatlantis.io/.vuepress/**/*'
- any-glob-to-any-file: 'runatlantis.io/.vitepress/**/*'
- any-glob-to-any-file: 'package.json'
- any-glob-to-any-file: 'pnpm-lock.yaml'
21 changes: 9 additions & 12 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
'pnpmDedupe',
],
prHourlyLimit: 1,
lockFileMaintenance: {
enabled: true,
},
osvVulnerabilityAlerts: true,
vulnerabilityAlerts: {
enabled: true,
Expand All @@ -33,14 +30,8 @@
},
packageRules: [
{
matchPackageNames: [
'vuepress',
'@vuepress/client',
'@vuepress/markdown',
'@vuepress/utils',
],
groupName: 'vuepress',
allowedVersions: '!/pre.*$/',
"matchFileNames": ["package.json"],
"enabled": false
},
{
matchFileNames: [
Expand Down Expand Up @@ -88,7 +79,12 @@
'(^|/)Dockerfile\\.[^/]*$',
],
matchStrings: [
'renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sENV .*?_VERSION=(?<currentValue>.*)\\s',
// example:
// # renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp
// ENV DEFAULT_TERRAFORM_VERSION=x.x.x
// # renovate: datasource=github-releases depName=open-policy-agent/conftest
// ARG DEFAULT_CONFTEST_VERSION=x.x.x
"renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s(ARG|ENV) .*?_VERSION=(?<currentValue>.*)\\s",
],
versioningTemplate: '{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}',
extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)',
Expand All @@ -108,6 +104,7 @@
customType: 'regex',
fileMatch: [
'.circleci/config.yml$',
'^\\.github/workflows/[^/]+\\.ya?ml$',
],
matchStrings: [
'renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s.*?_VERSION: (?<currentValue>.*)\\s',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
Expand All @@ -57,7 +57,7 @@ jobs:
PUSH: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

# Lint the Dockerfile first before setting anything up
- name: Lint Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
Expand Down Expand Up @@ -67,11 +67,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c7f9125735019aa87cfc361530512d50ea439c71 # v3
uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -85,7 +85,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@c7f9125735019aa87cfc361530512d50ea439c71 # v3
uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -98,7 +98,7 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c7f9125735019aa87cfc361530512d50ea439c71 # v3
uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3
with:
category: "/language:${{matrix.language}}"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
Expand All @@ -39,10 +39,10 @@ jobs:
name: Linting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

# need to setup go toolchain explicitly
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version-file: go.mod

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pr-size-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: pr-size

on: [pull_request]

jobs:
labeler:
runs-on: ubuntu-latest
name: Label the PR size
steps:
- uses: codelytv/pr-size-labeler@54ef36785e9f4cb5ecf1949cfc9b00dbb621d761 # v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/xs'
xs_max_size: '10'
s_label: 'size/s'
s_max_size: '200'
m_label: 'size/m'
m_max_size: '1000'
l_label: 'size/l'
l_max_size: '10000'
xl_label: 'size/xl'
fail_if_xl: 'false'
message_if_xl: >
This PR exceeds the recommended size of 1000 lines.
Please make sure you are NOT addressing multiple issues with one PR.
Note this PR might be rejected due to its size.
github_api_url: 'https://api.github.com'
files_to_ignore: ''
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
submodules: true

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version-file: go.mod

- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5
if: (!contains(github.ref, 'pre'))
with:
version: v1.16.2
Expand All @@ -43,7 +43,7 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Run GoReleaser for pre-release
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5
if: contains(github.ref, 'pre')
with:
version: v1.16.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renovate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
validate:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
- run: npx --package renovate -c 'renovate-config-validator'
48 changes: 44 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,33 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
filters: |
go:
- '**.go'
- '**.txt' # golden file test output
- 'go.*'
- '.github/workflows/test.yml'
test:
needs: [changes]
if: needs.changes.outputs.should-run-tests == 'true'
name: Tests
runs-on: ubuntu-22.04
container: ghcr.io/runatlantis/testing-env:latest@sha256:a8aa02f9fd0ecdbc44a62e6b4facce270605b1caccec4c03ed4f268c4f3b8f63
container: ghcr.io/runatlantis/testing-env:latest@sha256:346fd2028603d7c9369f709023ef993faf60a70ef4c91963f5baa7454196df32
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

# need to setup go toolchain explicitly
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version-file: go.mod

- run: make test-all
- run: make check-fmt

###########################################################
# Notifying #contributors about test failure on main branch
###########################################################
Expand Down Expand Up @@ -98,3 +100,41 @@ jobs:
runs-on: ubuntu-22.04
steps:
- run: 'echo "No build required"'

e2e-github:
runs-on: ubuntu-latest
# dont run e2e tests on forked PRs
if: github.repository == 'runatlantis/atlantis'
env:
TERRAFORM_VERSION: 1.8.3
ATLANTISBOT_GITHUB_USERNAME: ${{ secrets.ATLANTISBOT_GITHUB_USERNAME }}
ATLANTISBOT_GITHUB_TOKEN: ${{ secrets.ATLANTISBOT_GITHUB_TOKEN }}
NGROK_AUTH_TOKEN: ${{ secrets.ATLANTISBOT_NGROK_AUTH_TOKEN }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version-file: go.mod

# This version of TF will be downloaded before Atlantis is started.
# We do this instead of setting --default-tf-version because setting
# that flag starts the download asynchronously so we'd have a race
# condition.
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}

- name: Setup ngrok
run: |
wget -q -nc https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar -xzf ngrok-v3-stable-linux-amd64.tgz && \
chmod +x ngrok
./ngrok --help
- name: Setup gitconfig
run: |
git config --global user.email "maintainers@runatlantis.io"
git config --global user.name "atlantisbot"
- run: |
make build-service
./scripts/e2e.sh
4 changes: 2 additions & 2 deletions .github/workflows/testing-env-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
Expand All @@ -37,7 +37,7 @@ jobs:
name: Build Testing Env Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
Expand All @@ -46,7 +46,13 @@ jobs:
name: Website Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: markdown-lint
uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16
with:
config: .markdownlint.yaml
globs: 'runatlantis.io/**/*.md'

- uses: wyvox/action-setup-pnpm@6597ef5c1300fe08efa6bc75e6141f7153e2b4cc # v3
with:
Expand All @@ -65,15 +71,22 @@ jobs:
pnpm website:build
# start http-server for integration testing
npx http-server runatlantis.io/.vuepress/dist &
npx http-server runatlantis.io/.vitepress/dist &
- name: Run Playwright E2E tests
run: |
pnpx playwright install --with-deps
pnpm run e2e
- name: wait until server listened
run: curl --retry-delay 1 --retry 30 --retry-all-error http://localhost:8080

# medium.com => was being rate limited: HTTP 429
# twitter.com => too many redirections
- run: |
./muffet \
-e 'https://medium.com/runatlantis' \
-e 'https://twitter.com/*' \
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \
-e 'https://github.com/runatlantis/helm-charts#customization' \
-e 'https://github.com/sethvargo/atlantis-on-gke/blob/master/terraform/tls.tf#L64-L84' \
Expand Down
Loading

0 comments on commit f33221f

Please sign in to comment.