Skip to content

Fix TTL not being respected for completed Updates #1470

Fix TTL not being respected for completed Updates

Fix TTL not being respected for completed Updates #1470

---
permissions: write-all # Equivalent to default permissions plus id-token: write
name: Pulumi Kubernetes Operator PR Builds
on:
repository_dispatch:
types: [run-acceptance-tests-command]
push:
branches:
- master
pull_request:
branches:
- master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: v0.0-${{ github.sha }}
ESC_ACTION_OIDC_AUTH: true
ESC_ACTION_OIDC_ORGANIZATION: pulumi
ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization
ESC_ACTION_ENVIRONMENT: github-secrets/pulumi-pulumi-kubernetes-operator
ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: PULUMI_ACCESS_TOKEN,PULUMI_BOT_TOKEN
jobs:
comment-notification:
runs-on: ubuntu-latest
name: comment-notification
if: github.event_name == 'repository_dispatch'
steps:
- name: Create URL to the run output
id: vars
run: echo
run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
>> "$GITHUB_OUTPUT"
- name: Update with Result
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
body: "Please view the PR build: ${{ steps.vars.outputs.run-url }}"
build:
runs-on: ubuntu-latest
name: Build
if: github.event_name == 'repository_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Fetch secrets from ESC
id: esc-secrets
uses: pulumi/esc-action@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ steps.esc-secrets.outputs.DOCKER_USERNAME }}
password: ${{ steps.esc-secrets.outputs.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
push: false
load: true
platforms: linux/amd64
tags: |
pulumi/pulumi-kubernetes-operator:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Fetch secrets from ESC
id: esc-secrets
uses: pulumi/esc-action@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Lint pulumi-kubernetes-operator codebase
run: make lint
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
if: github.event_name == 'repository_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Fetch secrets from ESC
id: esc-secrets
uses: pulumi/esc-action@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install Pulumi CLI
uses: pulumi/actions@d7ceb0215da5a14ec84f50b703365ddf0194a9c8 # v6.6.0
with:
pulumi-version-file: .pulumi.version
- name: Run Tests (Agent)
run: make -C agent test
- name: Run Tests (Operator)
run: make -C operator test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: agent/coverage.out,operator/coverage.out
env:
CODECOV_TOKEN: ${{ steps.esc-secrets.outputs.CODECOV_TOKEN }}
e2e-tests:
runs-on: pulumi-ubuntu-8core
name: E2E tests
if: github.event_name == 'repository_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Fetch secrets from ESC
id: esc-secrets
uses: pulumi/esc-action@cf5b30703ffd5ad60cc3a880c09b3a9592b9372d # v1
- name: Setup cluster
uses: helm/kind-action@v1
with:
cluster_name: kind
node_image: kindest/node:v1.31.0
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run tests
run: make -C operator test-e2e