Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: update the publish task to avoid name collision #267

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 5 additions & 2 deletions .github/workflows/callable-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name: Callable-Publish
on:
workflow_call:
inputs:
runsOn:
default: ubuntu-latest
type: string
flavor:
required: true
type: string

jobs:
run:
runs-on: ubuntu-latest
runs-on: ${{ inputs.runsOn }}
permissions:
contents: read
packages: write
Expand All @@ -34,7 +37,7 @@ jobs:
shell: bash

- name: Publish Package
run: uds run publish --set FLAVOR=${{ inputs.flavor }} --no-progress
run: uds run publish-package --set FLAVOR=${{ inputs.flavor }} --no-progress

- name: Save logs
if: ${{ always() }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/callable-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Callable-Test
on:
workflow_call:
inputs:
runsOn:
default: ubuntu-latest
type: string
upgrade-flavors:
required: true
type: string
Expand All @@ -26,7 +29,7 @@ permissions:

jobs:
run:
runs-on: ubuntu-latest
runs-on: ${{ inputs.runsOn }}
timeout-minutes: 20
if: contains(inputs.upgrade-flavors, inputs.flavor) || inputs.type == 'install'

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ jobs:
strategy:
matrix:
flavor: [upstream, registry1, unicorn]
architecture: [amd64, arm64]
exclude:
- flavor: registry1
architecture: arm64
uses: ./.github/workflows/callable-publish.yaml
with:
flavor: ${{ matrix.flavor }}
runsOn: ${{ matrix.architecture == 'arm64' && 'uds-swf-ubuntu-arm64-4-core' || 'ubuntu-latest' }}
secrets: inherit # Inherits all secrets from the parent workflow.
90 changes: 46 additions & 44 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,19 @@ tasks:
- task: setup:k3d-full-cluster
- task: deploy:test-bundle

- name: create-package
- name: create-dev-package
description: Create UDS nginx Package
actions:
- task: create:package
with:
options: --skip-sbom

- name: create-test-bundle
description: Create a local UDS nginx bundle
actions:
- task: create-package
- task: create:test-bundle

- name: create-latest-release-bundle
description: Create UDS nginx bundle based on the latest release
actions:
- task: pull:latest-package-release
with:
spoof_release: "true"
- task: create:test-bundle

- name: dev
description: Create and deploy the bundle against an existing cluster
actions:
- task: create-test-bundle
- task: deploy:test-bundle

- name: publish
description: Build and publish the packages
actions:
- description: Create the AMD64 package
task: create:package
with:
architecture: amd64

- description: Create the ARM64 package
task: create:package
with:
architecture: arm64

- description: Publish the packages
task: publish:package
with:
# x-release-please-start-version
version: 1.0.0
# x-release-please-end

- name: test
description: Test and validate cluster is deployed with nginx
actions:
Expand All @@ -81,16 +47,34 @@ tasks:
address: nginx.uds.dev
code: 200

# CI will execute the following (via .github/actions/test) so they need to be here with these names
- name: create-deploy-test-bundle
description: Test and validate cluster is deployed with nginx
actions:
- description: Create the test bundle
task: create:test-bundle

- description: Deploy the test bundle
task: deploy:test-bundle

- description: Test the bundle
task: test

# CI will execute the following (via .github/actions/test and .github/actions/release) so they need to be here with these names
Racer159 marked this conversation as resolved.
Show resolved Hide resolved

- name: test-package
description: Test the nginx package from the current branch
actions:
- task: create-test-bundle
- task: setup:k3d-test-cluster
- task: deploy:test-bundle
- task: test
- task: compliance:validate
- description: Create a dev version of the package
task: create-dev-package

- description: Setup the cluster
task: setup:k3d-test-cluster

- description: Create deploy and test the bundle
task: create-deploy-test-bundle

- description: Validate OSCAL compliance
task: compliance:validate
with:
assessment_results: /tmp/oscal-assessment-results.yaml

Expand All @@ -103,12 +87,30 @@ tasks:
- task: compliance:validate
with:
assessment_results: /tmp/oscal-assessment-results.yaml
- task: create-test-bundle
- task: deploy:test-bundle
- task: test
- task: create-dev-package
- task: create-deploy-test-bundle
- task: compliance:validate
with:
assessment_results: /tmp/oscal-assessment-results.yaml
- task: compliance:evaluate
with:
assessment_results: /tmp/oscal-assessment-results.yaml

- name: publish-package
description: Build and publish the packages
actions:
- description: Create the package
task: create:package

- description: Setup the cluster
task: setup:k3d-test-cluster

- description: Create deploy and test the bundle
task: create-deploy-test-bundle

- description: Publish the packages
task: publish:package
with:
# x-release-please-start-version
version: 1.0.0
# x-release-please-end
Loading