Skip to content

Commit

Permalink
refactor(ci): change image to base-alt-p11 for virt-api virt-operator…
Browse files Browse the repository at this point in the history
…, add sysctl to virt-handler (#438)

Fix virt-operator and virt-api: warning: could not resolve current working directory: stat .: permission denied
Add sysctl to virt-handler image
---------

Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer authored Oct 14, 2024
1 parent 495d805 commit 6e062f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
4 changes: 1 addition & 3 deletions images/virt-api/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image: {{ $.ImageName }}
from: {{ .Images.DISTROLESS_ALT_P11 }}
fromImage: base-alt-p11
import:
- image: virt-artifact
add: /kubevirt-binaries/
Expand All @@ -12,8 +12,6 @@ import:
add: /kubevirt-config-files/
to: /etc
includePaths:
- passwd
- group
- .version
before: setup
# Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/cmd/virt-api/BUILD.bazel
Expand Down
23 changes: 2 additions & 21 deletions images/virt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
---
# Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/hack/dockerized#L15
{{- $builderImage := "quay.io/kubevirt/builder:2408151859-735f25dde" }}
{{- $version := "1.3.1" }}
{{- $goVersion := "1.22.7" }}

# Update Go version in builder to prevent CVEs in kubevirt components.
image: {{ $.ImageName }}-builder
final: false
from: {{ $builderImage }}
shell:
install:
- export GIMME_GO_VERSION={{ $goVersion }}
- |
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
- export PATH=`echo $PATH | tr ":" "\n" | grep -v "go" | tr "\n" ":"`
- source /etc/profile.d/gimme.sh && go version
docker:
ENV:
GIMME_GO_VERSION: "{{ $goVersion }}"
---
image: {{ $.ImageName }}
final: false
fromImage: base-alt-p11
Expand Down Expand Up @@ -119,13 +100,13 @@ shell:
- echo ============== Build virt-chroot ======================
- go build -o /kubevirt-binaries/virt-chroot ./cmd/virt-chroot/

- echo ============== Build virt-exportproxy ================
- echo ============== Build virt-exportproxy =================
- go build -o /kubevirt-binaries/virt-exportproxy ./cmd/virt-exportproxy/

- echo ============== Build virt-exportserver ================
- go build -o /kubevirt-binaries/virt-exportserver ./cmd/virt-exportserver/

- echo ============== Build virt-controller ====================
- echo ============== Build virt-controller ==================
- go build -o /kubevirt-binaries/virt-controller ./cmd/virt-controller/

- echo ============== Build virt-operator ====================
Expand Down
1 change: 1 addition & 0 deletions images/virt-handler/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ shell:
- |
apt-get update && apt-get install --yes \
acl \
procps \
nftables \
qemu-img==9.0.2-alt2 \
xorriso==1.5.6-alt1
Expand Down
4 changes: 1 addition & 3 deletions images/virt-operator/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image: {{ $.ImageName }}
from: {{ .Images.DISTROLESS_ALT_P11 }}
fromImage: base-alt-p11
import:
- image: virt-artifact
add: /kubevirt-binaries/
Expand All @@ -14,8 +14,6 @@ import:
add: /kubevirt-config-files/
to: /etc
includePaths:
- passwd
- group
- .version
before: setup
# Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/cmd/virt-operator/BUILD.bazel
Expand Down

0 comments on commit 6e062f0

Please sign in to comment.