Skip to content

Commit

Permalink
Fix e2e pipeline due to vagrant cloud infra issues (k3s-io#11706)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <derek.nola@suse.com>
  • Loading branch information
dereknola committed Feb 7, 2025
1 parent f46e705 commit 20098a8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,23 @@ ENTRYPOINT ["./scripts/entry.sh"]
CMD ["test"]


FROM vagrantlibvirt/vagrant-libvirt:0.12.1 AS test-e2e
RUN apt-get update && apt-get install -y docker.io
FROM vagrantlibvirt/vagrant-libvirt:sha-a94ce0d AS test-e2e
RUN apt-get update && apt-get install -y docker.io wget

ENV VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1
RUN vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
RUN vagrant box add bento/ubuntu-24.04 --provider libvirt --force

# Workaround for older vagrant-libvirt image and new vagrant infra wesbites
# See https://github.com/hashicorp/vagrant/issues/13571 and
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1840
RUN wget https://app.vagrantup.com/bento/boxes/ubuntu-24.04/versions/202404.26.0/providers/libvirt.box -O bento-ubuntu24.04-202404.26.0.box
RUN vagrant box add bento/ubuntu-24.04 bento-ubuntu24.04-202404.26.0.box
RUN cd /.vagrant.d/boxes/bento-VAGRANTSLASH-ubuntu-24.04/ && mv 0 202404.26.0 && echo -n "https://app.vagrantup.com/bento/boxes/ubuntu-24.04" > metadata_url

RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; \
chmod +x ./kubectl; \
mv ./kubectl /usr/local/bin/kubectl
RUN GO_VERSION=go1.21.11; \
RUN GO_VERSION=go1.22.5; \
curl -O -L "https://golang.org/dl/${GO_VERSION}.linux-amd64.tar.gz"; \
rm -rf /usr/local/go; \
tar -C /usr/local -xzf ${GO_VERSION}.linux-amd64.tar.gz;
Expand Down

0 comments on commit 20098a8

Please sign in to comment.