Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

99 changes: 0 additions & 99 deletions .github/renovate.json5

This file was deleted.

78 changes: 22 additions & 56 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,35 @@ on:
push:
branches:
- main
- release-*
workflow_dispatch: {}
pull_request: {}
workflow_dispatch:
inputs:
version:
description: Package version (e.g. v0.1.0)
required: false

env:
DOCKER_BUILDX_VERSION: 'v0.8.2'

XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }}
UP_API_TOKEN: ${{ secrets.UP_API_TOKEN }}
UP_ORG: ${{ secrets.UP_ORG }}

jobs:
detect-noop:
runs-on: ubuntu-24.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'

publish-artifacts:
runs-on: ubuntu-24.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

deploy:
runs-on: ubuntu-latest
steps:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
with:
version: ${{ env.DOCKER_BUILDX_VERSION }}
install: true

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true

- name: Fetch History
run: git fetch --prune --unshallow
id: checkout
uses: actions/checkout@v4

- name: Build Artifacts
run: make -j2 build.all
env:
# We're using docker buildx, which doesn't actually load the images it
# builds by default. Specifying --load does so.
BUILD_ARGS: "--load"

- name: Publish Artifacts to GitHub
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
- name: Install and login with up
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
uses: upbound/action-up@v1
with:
name: output
path: _output/**
api-token: ${{ secrets.UP_API_TOKEN }}
organization: ${{ secrets.UP_ORG }}

- name: Login to Upbound
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
if: env.XPKG_ACCESS_ID != ''
- name: Build and Push Upbound project
if: env.UP_API_TOKEN != ''
uses: upbound/action-up-project@v1
with:
registry: xpkg.upbound.io
username: ${{ secrets.XPKG_ACCESS_ID }}
password: ${{ secrets.XPKG_TOKEN }}

- name: Publish Artifacts
if: env.XPKG_ACCESS_ID != ''
run: make -j2 publish BRANCH_NAME=${GITHUB_REF##*/}
push-project: true
tag: ${{ inputs.version || '' }}
26 changes: 26 additions & 0 deletions .github/workflows/composition-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Composition Tests

on:
push:
branches:
- main
pull_request: {}

jobs:
composition-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install up
uses: upbound/action-up@v1
with:
skip-login: true

- name: Build project
run: up project build

- name: Run composition tests
run: up test run tests/*
46 changes: 36 additions & 10 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
name: End to End Testing

on:
issue_comment:
types: [created]
pull_request:
types: [labeled]
# https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
# pull_request_target is potentially dangerous target so we keep it strict
# under the label and benefit from secret propagation
pull_request_target:
types:
- synchronize
- labeled

env:
UP_API_TOKEN: ${{ secrets.UP_API_TOKEN }}
UP_ORG: ${{ secrets.UP_ORG }}

jobs:
e2e:
uses: upbound/official-providers-ci/.github/workflows/pr-comment-trigger.yml@main
with:
package-type: configuration
secrets:
UPTEST_CLOUD_CREDENTIALS: ${{ secrets.UPTEST_CLOUD_CREDENTIALS }}
UPTEST_DATASOURCE: ${{ secrets.UPTEST_DATASOURCE }}
if: contains(github.event.pull_request.labels.*.name, 'run-e2e-tests')
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install and login with up
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
uses: upbound/action-up@v1
with:
api-token: ${{ secrets.UP_API_TOKEN }}
organization: ${{ secrets.UP_ORG }}

- name: Build project
run: up project build

- name: Switch up context
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
run: up ctx ${{ secrets.UP_ORG }}/upbound-gcp-us-central-1/default

- name: Run e2e tests
if: env.UP_API_TOKEN != '' && env.UP_ORG != ''
run: up test run tests/* --e2e
File renamed without changes.
15 changes: 0 additions & 15 deletions .github/workflows/yamllint.yaml

This file was deleted.

11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/.cache
/.work
/_output
/results
/.idea

*.xpkg
kubeconfig
.venv
_output
.up
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "build"]
path = build
url = https://github.com/crossplane/build.git
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading
Loading