Skip to content

Commit

Permalink
ci: Bump to F28
Browse files Browse the repository at this point in the history
Closes: #1358
Approved by: cgwalters
  • Loading branch information
jlebon authored and rh-atomic-bot committed May 23, 2018
1 parent 23129a1 commit 592d605
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 29 deletions.
39 changes: 24 additions & 15 deletions .papr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,39 @@ branches:
- auto
- try

context: f27-codestyle
context: f28-codestyle

required: true
container:
image: registry.fedoraproject.org/fedora:27
image: registry.fedoraproject.org/fedora:28

tests:
- ci/ci-commitmessage-submodules.sh
- ci/codestyle.sh

---

context: f27-primary
context: f28-primary
inherit: true

cluster:
hosts:
- name: vmcheck1
distro: fedora/27/atomic
distro: fedora/28/atomic
# XXX: use updates ref for now so that we can use GA kernel in
# test-override-kernel.sh -- remove once another f28 AH update comes out
ostree:
branch: fedora/28/x86_64/updates/atomic-host
- name: vmcheck2
distro: fedora/27/atomic
distro: fedora/28/atomic
ostree:
branch: fedora/28/x86_64/updates/atomic-host
- name: vmcheck3
distro: fedora/27/atomic
distro: fedora/28/atomic
ostree:
branch: fedora/28/x86_64/updates/atomic-host
container:
image: registry.fedoraproject.org/fedora:27
image: registry.fedoraproject.org/fedora:28

env:
HOSTS: vmcheck1 vmcheck2 vmcheck3
Expand Down Expand Up @@ -98,9 +107,9 @@ branches:
- auto
- try

# NB: when bumping 27 here, also bump fedora.repo, and compose script
# NB: when bumping 28 here, also bump fedora.repo, and compose script

context: f27-compose
context: f28-compose

build: false

Expand All @@ -112,7 +121,7 @@ required: true
# which we don't have right now; so just provision a VM and do a
# docker --privileged run.
host:
distro: fedora/27/atomic
distro: fedora/28/atomic
# Compose tests are slow and should be parallelized
specs:
cpus: 4
Expand All @@ -125,7 +134,7 @@ tests:
-e RPMOSTREE_COMPOSE_TEST_USE_REPOS=/etc/yum.repos.d.host
-v /etc/yum.repos.d:/etc/yum.repos.d.host:ro
-v $(pwd):/srv/code -w /srv/code
registry.fedoraproject.org/fedora:27 /bin/sh -c
registry.fedoraproject.org/fedora:28 /bin/sh -c
"./ci/build.sh && make install && ./tests/compose"

artifacts:
Expand All @@ -138,21 +147,21 @@ branches:
- auto
- try

context: f27-ex-container
context: f28-ex-container
build: false
timeout: 30m
required: false

# See the f27-compose context for why we do things this way.
# See the f28-compose context for why we do things this way.
host:
distro: fedora/27/atomic
distro: fedora/28/atomic

tests:
- docker run --privileged --rm
-e RPMOSTREE_COMPOSE_TEST_USE_REPOS=/etc/yum.repos.d.host
-v /etc/yum.repos.d:/etc/yum.repos.d.host:ro
-v $(pwd):/srv/code -w /srv/code
registry.fedoraproject.org/fedora:27 /bin/sh -c
registry.fedoraproject.org/fedora:28 /bin/sh -c
"./ci/build.sh && make install && adduser unpriv && setfacl -m u:unpriv:rwX . && runuser -u unpriv ./tests/ex-container"

artifacts:
Expand Down
4 changes: 4 additions & 0 deletions ci/build-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ make install
# build.sh) because it doesn't support -Wno-error=macro-redefined, (and neither
# does clang on CentOS). Anyway, all we want is at least one clang run.
if test -x /usr/bin/clang; then
if grep -q -e 'static inline.*_GLIB_AUTOPTR_LIST_FUNC_NAME' /usr/include/glib-2.0/glib/gmacros.h; then
echo 'Skipping clang check, see https://bugzilla.gnome.org/show_bug.cgi?id=796346'
else
# Except unused-command-line-argument:
# error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened -cc1' [-Werror,-Wunused-command-line-argument]
# Except for macro-redefined:
Expand All @@ -25,4 +28,5 @@ if test -x /usr/bin/clang; then
export CC=clang
git clean -dfx && git submodule foreach git clean -dfx
build ${CONFIGOPTS:-}
fi
fi
2 changes: 1 addition & 1 deletion tests/compose-tests/test-mutate-os-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -xeuo pipefail

dn=$(cd $(dirname $0) && pwd)
. ${dn}/libcomposetest.sh
releasever=27
releasever=28

# specifying the key but neither automatic_version_prefix nor
# --add-metadata-string should cause no mutation
Expand Down
2 changes: 1 addition & 1 deletion tests/composedata/fedora-base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ref": "fedora/stable/${basearch}",
"releasever": "27",
"releasever": "28",

"repos": ["fedora", "updates"],

Expand Down
4 changes: 2 additions & 2 deletions tests/ex-container-tests/test-bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cat >bash.conf <<EOF
ref=bash
packages=coreutils;bash;
repos=fedora;
releasever=27
releasever=28
EOF

rpm-ostree ex container assemble bash.conf
Expand All @@ -25,7 +25,7 @@ cat >bash-nodocs.conf <<EOF
ref=bash-nodocs
packages=coreutils;bash;
repos=fedora;
releasever=27
releasever=28
documentation=false;
EOF

Expand Down
2 changes: 1 addition & 1 deletion tests/ex-container-tests/test-httpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cat >httpd.conf <<EOF
ref=httpd
packages=httpd;
repos=fedora;
releasever=27
releasever=28
EOF

# This one has non-root ownership in some of the dependencies, but we shouldn't
Expand Down
19 changes: 10 additions & 9 deletions tests/vmcheck/test-override-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,28 @@ if test "${osid}" != 'ID=fedora'; then
fi

# Test that we can override the kernel. For ease of testing
# I just picked the "gold" F27 kernel.
vm_cmd 'curl -sS -L -O https://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/x86_64/os/Packages/k/kernel-4.13.9-300.fc27.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/x86_64/os/Packages/k/kernel-core-4.13.9-300.fc27.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/x86_64/os/Packages/k/kernel-modules-4.13.9-300.fc27.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/27/Everything/x86_64/os/Packages/k/kernel-modules-extra-4.13.9-300.fc27.x86_64.rpm'
# I just picked the "gold" F28 kernel.
vm_cmd 'curl -sS -L \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/k/kernel-4.16.3-301.fc28.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/k/kernel-core-4.16.3-301.fc28.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/k/kernel-modules-4.16.3-301.fc28.x86_64.rpm \
-O https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Everything/x86_64/os/Packages/k/kernel-modules-extra-4.16.3-301.fc28.x86_64.rpm'
current=$(vm_get_booted_csum)
vm_cmd rpm-ostree db list "${current}" > current-dblist.txt
assert_not_file_has_content current-dblist.txt 'kernel-4.13.9-300.fc27'
assert_not_file_has_content current-dblist.txt 'kernel-4.16.3-301.fc28'
grep -E '^ kernel-4' current-dblist.txt | sed -e 's,^ *,,' > orig-kernel.txt
assert_streq "$(wc -l < orig-kernel.txt)" "1"
orig_kernel=$(cat orig-kernel.txt)
vm_rpmostree override replace ./kernel*4.13.9*.rpm
vm_rpmostree override replace ./kernel*4.16.3*.rpm
new=$(vm_get_pending_csum)
vm_cmd rpm-ostree db list "${new}" > new-dblist.txt
assert_file_has_content_literal new-dblist.txt 'kernel-4.13.9-300.fc27'
assert_file_has_content_literal new-dblist.txt 'kernel-4.16.3-301.fc28'
if grep -q -F -e "${orig_kernel}" new-dblist.txt; then
fatal "Found kernel: ${line}"
fi
newroot=$(vm_get_deployment_root 0)
vm_cmd find ${newroot}/usr/lib/modules -maxdepth 1 -type d > modules-dirs.txt
assert_streq "$(wc -l < modules-dirs.txt)" "2"
assert_file_has_content_literal modules-dirs.txt '4.13.9-300.fc27'
assert_file_has_content_literal modules-dirs.txt '4.16.3-301.fc28'

echo "ok override kernel"

0 comments on commit 592d605

Please sign in to comment.