Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
dist: bionic
language: go
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- tip
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid having to update this every time, we should have a 1.x entry so we're always testing the latest release.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. That way we wouldn't be testing "latest - 1", would that be an issue? (go supports last two versions, and not everyone may be on latest on day 1)

Also it would mean CI "silently" switching to a new Go version, which could be confusing why things all of a sudden start to fail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have tip to test on the latest version, no need to have 1.x.

Copy link
Copy Markdown
Member

@cyphar cyphar Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tip tests the latest build of Go master, not the latest released version. This would be like testing against nightly in the Rust world (useful, but not as useful as testing against the latest release).

I wasn't saying to remove the latest - 1 line (annoyingly Travis doesn't support this concept), I was just saying we should add 1.x.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't saying to remove the latest - 1 line (annoyingly Travis doesn't support this concept)

I just found they actually do! Travis is using gimme (https://github.com/travis-ci/gimme) for installing go versions, and this is what it gives to me

[kir@kir-rhat runc]$ gimme -r oldstable
1.13.8
[kir@kir-rhat runc]$ gimme -r stable
1.14
[kir@kir-rhat runc]$ gimme -r 1.x
1.14

I also learned that tip means "get go it from git and compile" and I am not sure we want it.

So, since golang supports two versions, we can use stable and oldstable and catch the problems early. I think @thaJeztah would say that specifying versions explicitly is always better because we know what we use, and it won't break suddenly because of golang 1.23 (or whatever) is released. To that, I'd say (1) we have to support supported go releases, and if something breaks we need to take care ASAP (2) it is not ideal, but better than the current situation then we test everything on two unsupported go releases.

Copy link
Copy Markdown
Member

@cyphar cyphar Mar 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to using oldstable and stable.

I also learned that tip means "get go it from git and compile" and I am not sure we want it.

Yup, that was what I was trying to say earlier.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, the bad news is for some reason oldstable is not working for Travis CI (which uses the very same version of gimme that I did above so I'm not sure why).

Reported earlier (perhaps to a wrong place)
travis-ci/gimme#179

I have reported it as well (hopefully to the right place)
https://travis-ci.community/t/cant-specify-oldstable-as-go-version-in-travis-yml/7670

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also filed travis-ci/gimme#185.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is finally allegedly fixed, so #2538


matrix:
include:
- go: 1.12.x
- go: 1.13.x
env:
- RUNC_USE_SYSTEMD=1
script:
- make BUILDTAGS="${BUILDTAGS}" all
- sudo PATH="$PATH" make localintegration RUNC_USE_SYSTEMD=1
- go: 1.12.x
- go: 1.13.x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I don't understand here (maybe just because it's slow Saturday) is why there is only a single versoin of go (such as go: 1.13.x) in this matrix.

env:
- VIRTUALBOX_VERSION=6.0
- VAGRANT_VERSION=2.2.6
Expand Down
84 changes: 49 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
FROM golang:1.12-stretch
ARG GO_VERSION=1.13.8
ARG BATS_VERSION=03608115df2071fff4eaaff1605768c275e5f81f
ARG CRIU_VERSION=v3.12
ARG DEBIAN_FRONTEND=noninteractive

FROM golang:${GO_VERSION}-buster
ARG DEBIAN_FRONTEND

RUN dpkg --add-architecture armel \
&& dpkg --add-architecture armhf \
&& dpkg --add-architecture arm64 \
&& dpkg --add-architecture ppc64el \
&& apt-get update && apt-get install -y \
build-essential \
curl \
sudo \
gawk \
iptables \
jq \
pkg-config \
libaio-dev \
libcap-dev \
libprotobuf-dev \
libprotobuf-c0-dev \
libnl-3-dev \
libnet-dev \
libseccomp2 \
libseccomp-dev \
protobuf-c-compiler \
protobuf-compiler \
python-minimal \
uidmap \
kmod \
crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-arm64 crossbuild-essential-ppc64el \
libseccomp-dev:armel libseccomp-dev:armhf libseccomp-dev:arm64 libseccomp-dev:ppc64el \
--no-install-recommends \
&& apt-get clean
&& dpkg --add-architecture ppc64el

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
crossbuild-essential-arm64 \
crossbuild-essential-armel \
crossbuild-essential-armhf \
crossbuild-essential-ppc64el \
curl \
gawk \
iptables \
jq \
kmod \
libaio-dev \
libcap-dev \
libnet-dev \
libnl-3-dev \
libprotobuf-c-dev \
libprotobuf-dev \
libseccomp-dev \
libseccomp-dev:arm64 \
libseccomp-dev:armel \
libseccomp-dev:armhf \
libseccomp-dev:ppc64el \
libseccomp2 \
pkg-config \
protobuf-c-compiler \
protobuf-compiler \
python-minimal \
sudo \
uidmap \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*;

# Add a dummy user for the rootless integration tests. While runC does
# not require an entry in /etc/passwd to operate, one of the tests uses
Expand All @@ -37,30 +50,31 @@ RUN dpkg --add-architecture armel \
RUN useradd -u1000 -m -d/home/rootless -s/bin/bash rootless

# install bats
ARG BATS_VERSION
RUN cd /tmp \
&& git clone https://github.com/sstephenson/bats.git \
&& cd bats \
&& git reset --hard 03608115df2071fff4eaaff1605768c275e5f81f \
&& git reset --hard "${BATS_VERSION}" \
&& ./install.sh /usr/local \
&& rm -rf /tmp/bats

# install criu
ENV CRIU_VERSION v3.12
ARG CRIU_VERSION
RUN mkdir -p /usr/src/criu \
&& curl -sSL https://github.com/checkpoint-restore/criu/archive/${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
&& cd /usr/src/criu \
&& make install-criu \
&& rm -rf /usr/src/criu

# setup a playground for us to spawn containers in
ENV ROOTFS /busybox
RUN mkdir -p ${ROOTFS}

COPY script/tmpmount /
WORKDIR /go/src/github.com/opencontainers/runc
ENTRYPOINT ["/tmpmount"]

ADD . /go/src/github.com/opencontainers/runc

# setup a playground for us to spawn containers in
COPY tests/integration/multi-arch.bash tests/integration/
ENV ROOTFS /busybox
RUN mkdir -p ${ROOTFS}
RUN . tests/integration/multi-arch.bash \
&& curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}

COPY . .