tests-container: New experimental testing code path

This generates a docker image that contains a cached blob of RPMs, so
it's easy to test compose tree.

It's hacky and ugly, but it's better than nothing.
This commit is contained in:
Colin Walters 2016-03-10 13:02:47 -05:00
parent 180d5c5374
commit f925d9ced4
7 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=0
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=0

View File

@ -0,0 +1,9 @@
FROM centos
ADD centos-atomic-7.repo /etc/yum.repos.d/centos-atomic-7.repo
ADD local.repo /etc/yum.repos.d/local.repo
ADD repo /var/tmp/repo
ADD pkgblob.tar /var/tmp/centos
ADD test-centos.json /var/tmp/test/test-centos.json
ADD test-centos.repo /var/tmp/test/test-centos.repo
ADD container-build.sh /usr/bin/container-build
RUN /usr/bin/container-build

View File

@ -0,0 +1,5 @@
[centos-atomic7-testing]
name=centos-atomic7-testing
baseurl=https://cbs.centos.org/repos/atomic7-testing/x86_64/os/
enabled=1
gpgcheck=0

View File

@ -0,0 +1,9 @@
#!/bin/sh
set -xeuo pipefail
yum -y install rpm-ostree
cd /var/tmp
mkdir -p test
cd test
mkdir repo
ostree --repo=repo init --mode=bare-user

View File

@ -0,0 +1,4 @@
[local]
name=local
baseurl=file:///var/tmp/repo
gpgcheck=0

View File

@ -0,0 +1,6 @@
{
"ref": "testos/x86_64/test",
"repos": ["test-centos"],
"packages": ["kernel", "systemd"],
"selinux": true
}

View File

@ -0,0 +1,4 @@
[test-centos]
name=test-centos
baseurl=file:///var/tmp/centos/pkgblob
gpgcheck=0