-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use image sha for sample image (#465)
The RedHat certification requires that images are referenced by sha. Add a sha for the sample image, and also add a script to update the sha when 'make bundle' is run
- Loading branch information
Showing
4 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,30 @@ | ||
#!/bin/sh | ||
|
||
# This script fetches the sha256 for the latest version of the open liberty getting started container | ||
# image, and then edits the sample deployment and the csv for the operator, and inserts the tag | ||
|
||
if ! skopeo -v ; then | ||
echo "Skopeo is not installed. Sample sha will not be updated" | ||
exit | ||
fi | ||
|
||
echo "Editing sample tag" | ||
SHA=$(skopeo inspect docker://icr.io/appcafe/open-liberty/samples/getting-started:latest | jq '.Digest'| sed -e 's/"//g') | ||
if [ -z $SHA ] | ||
then | ||
echo "Couldn't find latest SHA for sample image" | ||
exit | ||
fi | ||
|
||
echo "sha is $SHA" | ||
|
||
files=" | ||
config/samples/rc.app.stacks_v1_runtimecomponent.yaml | ||
" | ||
|
||
for file in $files | ||
do | ||
sed -i.bak "s,getting-started@sha256:[a-zA-Z0-9]*,getting-started@$SHA," $file | ||
rm $file.bak | ||
done | ||
|