Skip to content

Commit

Permalink
chore(ci): edit go version in kubevirt vi go mod edit
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita korolev <[email protected]>
  • Loading branch information
universal-itengineer committed Sep 27, 2024
1 parent 9e4f543 commit c2dc8f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@ tasks:
cve:scan:
cmds:
- task: cve:bin
- tools/cve/scan-main.sh {{.REPORT_FILE_NAME}}
# - task: cve:bin
- tools/cve/scan-main.sh {{.REPORT_FILE_NAME}} {{.TAG}}
10 changes: 8 additions & 2 deletions images/virt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/hack/dockerized#L15
{{- $builderImage := "quay.io/kubevirt/builder:2408161422-1f8c489011" }}
{{- $builderImage := "quay.io/kubevirt/builder:2408151859-735f25dde" }}
{{- $version := "1.3.1" }}
{{- $goVersion := "1.22.7" }}

Expand All @@ -15,7 +15,8 @@ shell:
rm -rf /gimme && \
mkdir -p /gimme && curl -sL \
https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | \
HOME=/gimme bash >> /etc/profile.d/gimme.sh
HOME=/gimme bash > /etc/profile.d/gimme.sh
- export PATH=`echo $PATH | tr ":" "\n" | grep -v "go" | tr "\n" ":"`
- source /etc/profile.d/gimme.sh && go version
docker:
ENV:
Expand All @@ -40,6 +41,11 @@ shell:
setup:
- git clone --depth 1 --branch v{{ $version }} https://github.com/kubevirt/kubevirt.git /kubevirt
- cd /kubevirt
- sed -i -e 's/go_version = ".*"/go_version = "{{ $goVersion }}"/' WORKSPACE
- |
source /etc/profile.d/gimme.sh
go mod edit -go={{ $goVersion }}
go mod tidy
- |
for p in /patches/*.patch ; do
echo -n "Apply ${p} ... "
Expand Down
3 changes: 3 additions & 0 deletions tools/cve/scan-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ module_tag=$2
if [[ -z $REPORT_FILE_NAME ]];then echo "file must be define";exit 1;fi
if [[ -z $module_tag ]]; then module_tag=main; fi

echo REPORT_FILE_NAME "$REPORT_FILE_NAME"
echo module_tag "$module_tag"

# Prepare images digests in form of "image_name image_sha256_digest".
images_digests=$(crane export dev-registry.deckhouse.io/sys/deckhouse-oss/modules/virtualization:${module_tag} - | tar -Oxf - images_digests.json | jq -r 'to_entries[] | .key + " " + .value')

Expand Down

0 comments on commit c2dc8f5

Please sign in to comment.