diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 162dd92..5e0f8ee 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -18,20 +18,28 @@ 'automated', 'run-e2e-tests', ], - ignorePaths: [ // default renovate ignorePaths without '**/examples/**' + ignorePaths: [ + // Renovate defaults minus '**/examples/**' and '**/tests/**' (so pep621 pins under tests/ are watched) '**/node_modules/**', '**/bower_components/**', '**/vendor/**', '**/__tests__/**', '**/test/**', - '**/tests/**', - '**/__fixtures__/**' + '**/__fixtures__/**', + // Synced from upbound/sa-up (gitops/shared-files). Renovate bumps them there; + // bumping them here too gets overwritten (and looks like a downgrade) on the next sync. + '.github/workflows/ci.yaml', + '.github/workflows/composition-tests.yaml', + '.github/workflows/e2e.yaml', + '.github/workflows/tag.yml', + '.github/workflows/yamllint.yaml', ], crossplane: { fileMatch: ['(^|/)examples/.*\\.ya?ml$'] }, packageRules: [ { + // Repo-specific workflows only; the synced ones are ignored above. matchFileNames: [ '.github/**', ], @@ -48,6 +56,22 @@ matchFileNames: ['examples/**'], groupName: 'examples' }, + { + // poetry supersedes pep621 for a pyproject.toml without a pep621 lockfile + // (renovatebot/renovate#37458) and also reads [project].dependencies, so + // match both managers. + matchManagers: ['pep621', 'poetry'], + matchFileNames: ['functions/**'], + groupName: 'python function dependencies', + }, + { + matchManagers: ['pep621', 'poetry'], + matchFileNames: ['tests/**'], + groupName: 'python test dependencies', + // test-only pins are gated by the offline composition tests; drop the + // run-e2e-tests label so their bumps don't spend a real e2e cluster + labels: ['automated'], + }, ], customManagers: [ { @@ -62,6 +86,19 @@ datasourceTemplate: '{{{datasource}}}', depNameTemplate: '{{{depName}}}', }, + { + customType: 'regex', + description: 'Bump Helm chart versions embedded in the Python composition functions', + fileMatch: [ + '^functions/.*\\.py$', + ], + matchStrings: [ + '#\\s*renovate:\\s*datasource=(?[^\\s]+)\\s+depName=(?[^\\s]+)\\s+registryUrl=(?[^\\s]+)\\s*\\n\\s*"version":\\s*"(?[^"]+)"', + ], + datasourceTemplate: '{{{datasource}}}', + depNameTemplate: '{{{depName}}}', + registryUrlTemplate: '{{{registryUrl}}}', + }, ], "git-submodules": { "enabled": true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3701cd..2e68b2e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,18 +22,19 @@ jobs: steps: - name: Checkout id: checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Install and login with up if: env.UP_API_TOKEN != '' && env.UP_ORG != '' - uses: upbound/action-up@53fe6395637d884c80d2bbc8c2d75d0ece776ced # v1 + uses: upbound/action-up@2c4d9663b902087b0808b79fe2c7ec68424d87d8 # v1 with: api-token: ${{ secrets.UP_API_TOKEN }} organization: ${{ secrets.UP_ORG }} # doesn't work with plain token when pushing otherwise - name: Login to xpkg with robot - uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 + if: env.UP_API_TOKEN != '' && env.UP_ROBOT_ID != '' + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4 with: registry: ${{ env.XPKG_REGISTRY }} username: ${{ env.UP_ROBOT_ID }} @@ -41,7 +42,7 @@ jobs: - name: Build and Push Upbound project if: env.UP_API_TOKEN != '' - uses: upbound/action-up-project@b849ec1eb303ae4abf22b2b86c0e2afca155137b # v1 + uses: upbound/action-up-project@1d22ac1cce7d995595d1d1ecc1bf8312ed0307c9 # v1 with: push-project: true tag: ${{ inputs.version || '' }} diff --git a/.github/workflows/composition-tests.yaml b/.github/workflows/composition-tests.yaml index 2715ef5..4815890 100644 --- a/.github/workflows/composition-tests.yaml +++ b/.github/workflows/composition-tests.yaml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout id: checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Install up - uses: upbound/action-up@53fe6395637d884c80d2bbc8c2d75d0ece776ced # v1 + uses: upbound/action-up@2c4d9663b902087b0808b79fe2c7ec68424d87d8 # v1 with: skip-login: true diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 1aa1928..f987ff6 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,20 +22,20 @@ jobs: steps: - name: Checkout id: checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: ref: ${{ github.event.pull_request.head.sha }} - name: Install and login with up if: env.UP_API_TOKEN != '' && env.UP_ORG != '' - uses: upbound/action-up@53fe6395637d884c80d2bbc8c2d75d0ece776ced # v1 + uses: upbound/action-up@2c4d9663b902087b0808b79fe2c7ec68424d87d8 # v1 with: api-token: ${{ env.UP_API_TOKEN }} organization: ${{ env.UP_ORG }} # doesn't work with plain token when pushing otherwise - name: Login to xpkg with robot - uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 + uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4 with: registry: xpkg.upbound.io username: ${{ env.UP_ROBOT_ID }} @@ -48,4 +48,14 @@ jobs: run: up ctx ${{ env.UP_ORG }}/upbound-gcp-us-central-1/${{ env.UP_GROUP }} - name: Run e2e tests - run: up test run tests/* --e2e + # Only tests/e2etest-* run on the shared cloud control plane. Other test + # directories (composition tests, or provisioning suites that a repo runs + # elsewhere, e.g. on KIND) are never picked up here. + run: | + shopt -s nullglob + tests=(tests/e2etest-*) + if [ ${#tests[@]} -eq 0 ]; then + echo "No tests/e2etest-* directories, nothing to run." + exit 0 + fi + up test run "${tests[@]}" --e2e diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index e2dd5cf..20564da 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Create Tag uses: negz/create-tag@39bae1e0932567a58c20dea5a1a0d18358503320 # v1 diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index ae49dff..aecaf4b 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -5,9 +5,9 @@ jobs: name: runner / yamllint runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: yamllint - uses: reviewdog/action-yamllint@f01d8a48fd8d89f89895499fca2cff09f9e9e8c0 # v1.21.0 + uses: reviewdog/action-yamllint@072d1a6ca6f5a03de10f492f6119fcbc8d47302b # v1.25.4 with: reporter: github-pr-review filter_mode: nofilter