Skip to content

Commit

Permalink
Add UBI 8 image to the dependencies report (#21374) (#21394)
Browse files Browse the repository at this point in the history
Red Hat certification process requires to include the UBI image in the
list of dependencies for the project.
Append it to the current list of dependencies.
This requires to include a new sourceURL column in the CSV, because
UBI images have a different url and source url. This is kept the same
for existing dependencies.

(cherry picked from commit e6c3d89)
  • Loading branch information
jsoriano committed Oct 1, 2020
1 parent 385ec4e commit e2428af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions dev-tools/dependencies-report
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ go list -m -json all $@ | go run go.elastic.co/go-licence-detector \
-noticeTemplate "$SRCPATH/notice/dependencies.csv.tmpl" \
-noticeOut "$outfile" \
-depsOut ""


# Fill-in required values for UBI images
# Check headers in $SRCPATH/notice/dependencies.csv.tmpl:
# name,url,version,revision,license
ubi8url='https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8'
ubi8source='https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz'
ubilicense='Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf,https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz'
cat <<EOF >> $outfile
Red Hat Universal Base Image,$ubi8url,8,,$ubilicense,$ubi8source
EOF
4 changes: 2 additions & 2 deletions dev-tools/notice/dependencies.csv.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- define "depInfo" -}}
{{- range $i, $dep := . }}
{{ $dep.Name }},{{ $dep.URL }},{{ $dep.Version | canonicalVersion }},{{ $dep.Version | revision }},{{ $dep.LicenceType }}
{{ $dep.Name }},{{ $dep.URL }},{{ $dep.Version | canonicalVersion }},{{ $dep.Version | revision }},{{ $dep.LicenceType }},{{ $dep.URL }}
{{- end -}}
{{- end -}}

name,url,version,revision,license{{ template "depInfo" .Direct }}{{ template "depInfo" .Indirect }}
name,url,version,revision,license,sourceURL{{ template "depInfo" .Direct }}{{ template "depInfo" .Indirect }}

0 comments on commit e2428af

Please sign in to comment.