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 5d1f59a
Show file tree
Hide file tree
Showing 3 changed files with 14 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}}
11 changes: 9 additions & 2 deletions images/virt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# 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" }}
# {{- $builderImage := "quay.io/kubevirt/builder:2408161422-1f8c489011" }}
{{- $version := "1.3.1" }}
{{- $goVersion := "1.22.7" }}

Expand All @@ -15,7 +16,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 +42,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 5d1f59a

Please sign in to comment.