Skip to content

Commit da37e0a

Browse files
committed
Move helm-schema into its own artifact for publishing, update schema url generation
1 parent ba938de commit da37e0a

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/pipeline.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ jobs:
180180
name: helm-chart
181181
path: |
182182
manifests/helm/dist/*.tgz
183+
retention-days: 7
184+
- name: Publish (Schema)
185+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
186+
with:
187+
name: helm-schema
188+
path: |
183189
manifests/helm/dist/*.schema.json
184190
retention-days: 7
185191
- name: Publish (Manifests)
@@ -436,10 +442,15 @@ jobs:
436442
dst: |
437443
${{ steps.dockerhub-meta.outputs.tags }}
438444
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
439-
id: download-artifacts
445+
id: download-manifests
440446
with:
441447
name: manifests
442-
path: ./artifacts
448+
path: ./manifests
449+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
450+
id: download-schema
451+
with:
452+
name: helm-schema
453+
path: ./schema
443454
- name: Publish
444455
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
445456
with:
@@ -454,7 +465,7 @@ jobs:
454465
quay.io/contrast/agent-operator:${{ env.BUILD_VERSION }}
455466
quay.io/contrast/agent-operator@${{ needs.build-image.outputs.digest }}
456467
```
457-
artifacts: ${{ steps.download-artifacts.outputs.download-path }}/*.yaml
468+
artifacts: "${{ steps.download-manifests.outputs.download-path }}/*.yaml,${{ steps.download-schema.outputs.download-path }}/*.json"
458469
token: ${{ secrets.GITHUB_TOKEN }}
459470
allowUpdates: true
460471
prerelease: ${{ needs.generate-version.outputs.is-release == 'false' }} # pre-releases will have is-release false

manifests/helm/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if($WriteSchemaUrl)
2222
{
2323
Write-Host "Updating values.yaml schema url"
2424
$content = Get-Content -Path "$root/values.yaml"
25-
$schemaText = [string]::Format('# yaml-language-server: $schema=https://contrastsecurity.dev/helm-charts/schemas/contrast-agent-operator-{0}.schema.json',$ChartVersion)
25+
$schemaText = [string]::Format('# yaml-language-server: $schema=https://github.com/Contrast-Security-OSS/agent-operator/releases/download/v{0}/values.schema.json',$AppVersion)
2626
$content = $content.Replace('# yaml-language-server: $schema=values.schema.json', $schemaText)
2727
Set-Content -Path "$root/values.yaml" -Value $content
2828
}

0 commit comments

Comments
 (0)