Skip to content

Commit bf01d48

Browse files
committed
new oras, hull 1.34
1 parent db05590 commit bf01d48

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

hull-vidispine-addon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ apiVersion: v1
33
appVersion: 1.33.1
44
description: hull-vidispine-addon
55
name: hull-vidispine-addon
6-
version: 1.33.1
6+
version: 1.34.0

images/hull-integration/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUN pwsh -NonInteractive -Command Install-Module -Force -Scope AllUsers powershe
33
RUN apt-get update
44
RUN apt-get -y upgrade
55
RUN apt-get -y install curl
6-
ENV VERSION="1.2.3"
6+
ENV VERSION="1.3.0"
77
RUN curl -LO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
88
RUN ls
99
RUN mkdir -p oras-install/

images/hull-integration/Dockerfile-noroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUN pwsh -NonInteractive -Command Install-Module -Force -Scope AllUsers powershe
33
RUN apt-get update
44
RUN apt-get -y upgrade
55
RUN apt-get -y install curl
6-
ENV VERSION="1.2.3"
6+
ENV VERSION="1.3.0"
77
RUN curl -LO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
88
RUN ls
99
RUN mkdir -p oras-install/

images/hull-integration/get-custom-scripts/GetSbomLicense.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ foreach($chartInfo in $entity._helm_charts_)
2121
$this.WriteLog("~~~ SBOM: ---> Processing License for Helm Chart $($chartInfo.name) and Version $($chartInfo.version)")
2222
$rootArtifact = "$($entity._oci_endpoint_.server)/helm-charts/vpms/$($chartInfo.name):$($chartInfo.version)"
2323
$this.WriteLog("~~~ SBOM: Getting related artifact $($rootArtifact)")
24-
$discoverCommand = "oras discover -o json --artifact-type 'mend/sbom' $($rootArtifact)"
25-
$discover = (oras discover -o json --artifact-type 'mend/sbom' $($rootArtifact)) -join "`n"
24+
$discoverCommand = "oras discover --format json --artifact-type 'mend/sbom' $($rootArtifact)"
25+
$discover = (oras discover --format json --artifact-type 'mend/sbom' $($rootArtifact)) -join "`n"
2626
$discoverExitCode = $LASTEXITCODE
2727
$this.WriteLog("~~~ SBOM: oras discover - Exit Code: $($discoverExitCode)")
2828

@@ -33,32 +33,32 @@ foreach($chartInfo in $entity._helm_charts_)
3333
$this.WriteLog("~~~ SBOM: $($discoverCommand) successful:")
3434
$this.WriteLog("~~~ SBOM: $($discoverJson)")
3535

36-
if (-not [bool]$discoverJson.PSObject.Properties['manifests'])
36+
if (-not [bool]$discoverJson.PSObject.Properties['referrers'])
3737
{
38-
$errorMessage = "~~~ SBOM: Manifests field for $($rootArtifact) does not exist! Skipping license upload ..."
38+
$errorMessage = "~~~ SBOM: Referrers field for $($rootArtifact) does not exist! Skipping license upload ..."
3939
$this.WriteError($errorMessage)
4040
return @{ "statusCode" = 500; "errorMessage" = $errorMessage } | ConvertTo-Json
4141
}
4242

43-
if (($discoverJson.manifests | Measure-Object).Count -eq 0)
43+
if (($discoverJson.referrers | Measure-Object).Count -eq 0)
4444
{
45-
$errorMessage = "~~~ SBOM: Manifests field for $($rootArtifact) has zero elements! Skipping license upload ..."
45+
$errorMessage = "~~~ SBOM: Referrers field for $($rootArtifact) has zero elements! Skipping license upload ..."
4646
$this.WriteError($errorMessage)
4747
return @{ "statusCode" = 500; "errorMessage" = $errorMessage } | ConvertTo-Json
4848
}
4949
else
5050
{
51-
if (($discoverJson.manifests | Measure-Object ).Count -gt 1)
51+
if (($discoverJson.referrers | Measure-Object ).Count -gt 1)
5252
{
53-
$errorMessage = "~~~ SBOM: Manifests field for $($rootArtifact) has more than one element! Only considering first element ..."
53+
$errorMessage = "~~~ SBOM: Referrers field for $($rootArtifact) has more than one element! Only considering first element ..."
5454
$this.WriteError($errorMessage)
5555
return @{ "statusCode" = 500; "errorMessage" = $errorMessage } | ConvertTo-Json
5656
}
5757

5858
# Download Artifacts
5959
New-Item -ItemType Directory -Path $downloadDirectory
60-
$pullCommand = "oras pull -o $downloadDirectory $rootArtifact@$(($discover | ConvertFrom-Json).manifests[0].digest)"
61-
$pull = (oras pull -o $downloadDirectory $rootArtifact@$(($discover | ConvertFrom-Json).manifests[0].digest)) -join "`n"
60+
$pullCommand = "oras pull -o $downloadDirectory $rootArtifact@$($discoverJson.referrers[0].digest)"
61+
$pull = (oras pull -o $downloadDirectory $rootArtifact@$($discoverJson.referrers[0].digest)) -join "`n"
6262
$pullExitCode = $LASTEXITCODE
6363
$this.WriteLog("~~~ SBOM: oras pull Exit Code: $($pullExitCode)")
6464

0 commit comments

Comments
 (0)