-
Notifications
You must be signed in to change notification settings - Fork 3
switch to gha #343
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
Merged
Merged
switch to gha #343
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat "$(dirname "$0")/../VERSION" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
read -r next_version | ||
|
||
echo "$next_version" > "$(dirname "$0")/../VERSION" | ||
|
||
extension_definitions="$(dirname "$0")/../extension-definitions.yaml" | ||
|
||
# pass env-var inline to make it available in yq subprocess | ||
NEXT_VERSION="$next_version" yq -i ' | ||
.installation.ocm_references[].version = strenv(NEXT_VERSION) | | ||
.installation.ocm_references[].artefact.version = strenv(NEXT_VERSION) | | ||
.installation.ocm_references[].mappings[].version = strenv(NEXT_VERSION) | ||
' "${extension_definitions}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
mode: | ||
required: true | ||
type: string | ||
description: | ||
mode as expected by `cc-utils/.github/workflows/prepare` | ||
either of | ||
- snapshot | ||
- release | ||
|
||
jobs: | ||
prepare: | ||
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master | ||
with: | ||
mode: ${{ inputs.mode }} | ||
|
||
odg-extension-definitions: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Export odg-extension-definitions | ||
run: | | ||
export version=${{ needs.prepare.outputs.version }} | ||
blobs_dir=blobs.d | ||
mkdir $blobs_dir | ||
extension_definitions="extension-definitions.yaml" | ||
|
||
yq -i ' | ||
.installation.ocm_references[].version = strenv(version) | | ||
.installation.ocm_references[].artefact.version = strenv(version) | | ||
.installation.ocm_references[].mappings[].version = strenv(version) | ||
' ${extension_definitions} | ||
|
||
tar czf ${blobs_dir}/extension_definitions.tar.gz ${extension_definitions} | ||
|
||
- uses: gardener/cc-utils/.github/actions/export-ocm-fragments@master | ||
with: | ||
ocm-resources: | | ||
name: odg-extension-definitions | ||
type: odg-extension | ||
relation: local | ||
access: | ||
type: localBlob | ||
localReference: extension_definitions.tar.gz | ||
blobs-directory: blobs.d | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: latest | ||
|
||
- name: Run ESLint | ||
run: | | ||
.ci/lint | ||
|
||
- name: Run ESLint (SAST) and collect evidence | ||
run: | | ||
set -euo pipefail | ||
blobs_dir=blobs.d | ||
mkdir -p $blobs_dir | ||
eslint_logfile=eslint-sast.log | ||
eslint_evidence="${blobs_dir}/eslint-sast.tar.gz" | ||
|
||
.ci/lint eslint.sast.config.mjs 2>&1 | tee $eslint_logfile | ||
|
||
tar czf $eslint_evidence $eslint_logfile eslint.sast.config.mjs | ||
|
||
- name: Export ESLint SAST evidence to component descriptor | ||
uses: gardener/cc-utils/.github/actions/export-ocm-fragments@master | ||
with: | ||
blobs-directory: blobs.d | ||
ocm-resources: | | ||
name: sast-linting-evidence | ||
relation: local | ||
access: | ||
type: localBlob | ||
localReference: eslint-sast.tar.gz | ||
labels: | ||
- name: gardener.cloud/purposes | ||
value: | ||
- lint | ||
- sast | ||
- eslint | ||
|
||
- name: gardener.cloud/comment | ||
value: | | ||
we use eslint with "eslint-plugin-security" for SAST scans | ||
see: https://github.com/eslint-community/eslint-plugin-security | ||
|
||
oci-image: | ||
name: Build OCI Image | ||
needs: | ||
- prepare | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
uses: gardener/cc-utils/.github/workflows/oci-ocm.yaml@master | ||
with: | ||
name: delivery-dashboard | ||
version: ${{ needs.prepare.outputs.version }} | ||
oci-registry: ${{ needs.prepare.outputs.oci-registry }} | ||
oci-repository: odg/delivery-dashboard | ||
dockerfile: Dockerfile | ||
ctx: oci-images | ||
oci-platforms: linux/amd64,linux/arm64 | ||
ocm-labels: | | ||
name: gardener.cloud/cve-categorisation | ||
value: | ||
network_exposure: public | ||
authentication_enforced: false | ||
user_interaction: end-user | ||
confidentiality_requirement: none | ||
integrity_requirement: high | ||
availability_requirement: high | ||
|
||
helmchart: | ||
name: Build Helmchart | ||
needs: | ||
- prepare | ||
- oci-image | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
uses: gardener/cc-utils/.github/workflows/helmchart-ocm.yaml@master | ||
with: | ||
name: delivery-dashboard | ||
dir: charts/delivery-dashboard | ||
oci-registry: ${{ needs.prepare.outputs.oci-registry }} | ||
oci-repository: charts/odg | ||
ocm-mappings: | | ||
- ref: ocm-resource:delivery-dashboard.repository | ||
attribute: image.repository | ||
- ref: ocm-resource:delivery-dashboard.tag | ||
attribute: image.tag | ||
- ref: ocm-resource:busybox.repository | ||
attribute: busybox.image.repository | ||
- ref: ocm-resource:busybox.tag | ||
attribute: busybox.image.tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI (non-release) | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yaml | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
secrets: inherit | ||
with: | ||
mode: snapshot | ||
TuanAnh17N marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
component-descriptor: | ||
uses: gardener/cc-utils/.github/workflows/post-build.yaml@master | ||
needs: | ||
- build | ||
secrets: inherit | ||
permissions: | ||
contents: write | ||
id-token: write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release | ||
TuanAnh17N marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yaml | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
secrets: inherit | ||
with: | ||
mode: release | ||
|
||
release-to-github-and-bump: | ||
uses: gardener/cc-utils/.github/workflows/release.yaml@master | ||
needs: build | ||
permissions: | ||
contents: write | ||
packages: write | ||
id-token: write | ||
secrets: inherit | ||
with: | ||
release-commit-target: branch | ||
next-version: bump-minor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: ocm.software/ocm-gear/delivery-dashboard | ||
resources: | ||
- name: busybox | ||
version: 1.37.0 | ||
type: ociImage | ||
access: | ||
type: ociRegistry | ||
imageReference: docker.io/library/busybox:1.37.0 | ||
8R0WNI3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
relation: external | ||
labels: | ||
- name: cloud.gardener.cnudie/responsibles | ||
value: | ||
- type: githubTeam | ||
teamname: open-component-model/odg-maintainers | ||
github_hostname: github.com | ||
sources: [] | ||
componentReferences: [] | ||
TuanAnh17N marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: delivery-dashboard | ||
installation: | ||
ocm_references: | ||
- helm_chart_name: delivery-dashboard | ||
name: ocm.software/ocm-gear/delivery-dashboard | ||
version: 0.399.0-dev | ||
artefact: | ||
name: delivery-dashboard | ||
version: 0.399.0-dev | ||
mappings: | ||
- name: delivery-dashboard | ||
version: 0.399.0-dev | ||
artefact_type: helmchart-imagemap | ||
value_templates: | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: target_namespace | ||
value: ${target_namespace} | ||
value_type: python-string-template | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: ingress.hosts | ||
value: | ||
- delivery-dashboard.${base_url} | ||
value_type: python-string-template | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: envVars.REACT_APP_DELIVERY_SERVICE_API_URL | ||
value: dependencies.delivery-service.outputs.delivery-service-url | ||
value_type: jsonpath | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: ingress.annotations."cert.gardener.cloud/purpose" | ||
value: managed | ||
value_type: literal | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: ingress.annotations."dns.gardener.cloud/class" | ||
value: garden | ||
value_type: literal | ||
- helm_chart_name: delivery-dashboard | ||
helm_attribute: ingress.annotations."dns.gardener.cloud/dnsnames" | ||
value: '"*"' | ||
zkdev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
value_type: literal | ||
outputs: [] | ||
dependencies: | ||
- delivery-service |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.