Skip to content

Commit

Permalink
cluster: Allow kubevirtci tag overriding (#319)
Browse files Browse the repository at this point in the history
* cluster: Allow kubevirtci tag overriding

It is helpful either manually or for example
when used from CNAO, to use same tag of the cluster that CNAO deployed.
Otherwise a kubevirtci tag mismatch can cause failures once running from CNAO.

Signed-off-by: Or Shoval <oshoval@redhat.com>

* dockerfile: Fix go downloading

Previous method doesnt support newer versions anymore
(or not at least atm).

Just use wget instead.

Signed-off-by: Or Shoval <oshoval@redhat.com>

---------

Signed-off-by: Or Shoval <oshoval@redhat.com>
  • Loading branch information
oshoval committed Jul 3, 2024
1 parent 86f45a9 commit 067f77c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cluster/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

export KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER:-'k8s-1.26-centos9'}
export KUBEVIRTCI_TAG=2305081329-48e913c
export KUBEVIRTCI_TAG=${KUBEVIRTCI_TAG:-2305081329-48e913c}

KUBEVIRTCI_REPO='https://github.com/kubevirt/kubevirtci.git'
# The CLUSTER_PATH var is used in cluster folder and points to the _kubevirtci where the cluster is deployed from.
Expand Down
10 changes: 9 additions & 1 deletion cmd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ RUN mkdir /workdir
WORKDIR /workdir

COPY go.mod .
RUN dnf install -y golang-$(sed -En 's/^go +(.*+)$/\1/p' go.mod).*

RUN dnf install -y wget

RUN GO_VERSION=$(sed -En 's/^go +(.*)$/\1/p' go.mod) && \
wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz && \
rm go${GO_VERSION}.linux-amd64.tar.gz

ENV PATH /usr/local/go/bin:$PATH

COPY . .

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ replace (
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.1
)

go 1.21
go 1.21.0

0 comments on commit 067f77c

Please sign in to comment.