URL: https://github.com/freeipa/freeipa/pull/5017
Author: abbra
 Title: #5017: [Backport][ipa-4-8] [Azure] Switch to dockerhub
Action: opened

PR body:
"""
This PR was opened automatically because PR #5013 was pushed to master and 
backport to ipa-4-8 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5017/head:pr5017
git checkout pr5017
From a54c3edbc0c58ca11ab6be32a634de90fbe9cf27 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 7 Aug 2020 10:10:52 +0300
Subject: [PATCH 1/2] Azure: Switch to dockerhub provider

`registry.fedoraproject.org/f32/fedora-toolbox` image is used to build
packages on Azure Pipelines.

registry.fedoraproject.org experiences an availability problem and makes
unstable FreeIPA CI.

Fedora also distributes its official images on https://hub.docker.com/_/fedora.
`fedora:32` is already used by FreeIPA CI to build the image for tests.

Signed-off-by: Stanislav Levin <s...@altlinux.org>
---
 freeipa.spec.in                                    | 1 +
 ipatests/azure/Dockerfiles/Dockerfile.build.fedora | 4 ----
 ipatests/azure/templates/prepare-build-fedora.yml  | 1 +
 ipatests/azure/templates/variables-fedora.yml      | 2 +-
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 8d24c76c80..0b25a2b1da 100755
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -245,6 +245,7 @@ BuildRequires:  python3-wheel
 BuildRequires:  jsl
 BuildRequires:  rpmlint
 BuildRequires:  softhsm
+BuildRequires:  keyutils
 BuildRequires:  python3-augeas
 BuildRequires:  python3-cffi
 BuildRequires:  python3-cryptography >= 1.6
diff --git a/ipatests/azure/Dockerfiles/Dockerfile.build.fedora b/ipatests/azure/Dockerfiles/Dockerfile.build.fedora
index 07fc573a83..674bf60ed7 100644
--- a/ipatests/azure/Dockerfiles/Dockerfile.build.fedora
+++ b/ipatests/azure/Dockerfiles/Dockerfile.build.fedora
@@ -4,10 +4,6 @@ ENV container=docker LANG=en_US.utf8 LANGUAGE=en_US.utf8 LC_ALL=en_US.utf8
 
 ADD dist /root
 RUN echo 'deltarpm = false' >> /etc/dnf/dnf.conf \
-    && dnf install -y dnf-plugins-core \
-    && dnf config-manager --set-enabled updates-testing \
-    && dnf config-manager --set-enabled updates-testing-modular \
-    && dnf config-manager --set-disabled fedora-cisco-openh264 \
     && dnf update -y dnf \
     && sed -i 's/%_install_langs \(.*\)/\0:fr/g' /etc/rpm/macros.image-language-conf \
     && dnf install -y systemd \
diff --git a/ipatests/azure/templates/prepare-build-fedora.yml b/ipatests/azure/templates/prepare-build-fedora.yml
index 9de1be101e..c1d33b36ff 100644
--- a/ipatests/azure/templates/prepare-build-fedora.yml
+++ b/ipatests/azure/templates/prepare-build-fedora.yml
@@ -5,6 +5,7 @@ steps:
     sudo dnf makecache || :
     echo "Installing base development environment"
     sudo dnf install -y \
+        'dnf-command(builddep)' \
         gdb-minimal \
         make \
         autoconf \
diff --git a/ipatests/azure/templates/variables-fedora.yml b/ipatests/azure/templates/variables-fedora.yml
index 8475fc40ea..9440942f73 100644
--- a/ipatests/azure/templates/variables-fedora.yml
+++ b/ipatests/azure/templates/variables-fedora.yml
@@ -1,7 +1,7 @@
 variables:
   IPA_PLATFORM: fedora
   # the Docker public image to build IPA packages (rpms)
-  DOCKER_BUILD_IMAGE: 'registry.fedoraproject.org/f32/fedora-toolbox'
+  DOCKER_BUILD_IMAGE: 'fedora:32'
 
   # the Dockerfile to build Docker image for running IPA tests
   DOCKER_DOCKERFILE: ${{ format('Dockerfile.build.{0}', variables.IPA_PLATFORM) }}

From b2e84aaa9e93b8ed3c514cab3fa29fae8a20038b Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 7 Aug 2020 11:27:28 +0300
Subject: [PATCH 2/2] ipatests: Skip keyring tests on containerized platforms

The kernel keyrings are not namespaced yet.

Signed-off-by: Stanislav Levin <s...@altlinux.org>
---
 ipatests/azure/azure-pipelines.yml               | 8 ++++----
 ipatests/azure/azure_definitions/base-fedora.yml | 2 --
 ipatests/test_ipapython/test_keyring.py          | 3 +++
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ipatests/azure/azure-pipelines.yml b/ipatests/azure/azure-pipelines.yml
index b4d5cb2fcd..bc7e6bf913 100644
--- a/ipatests/azure/azure-pipelines.yml
+++ b/ipatests/azure/azure-pipelines.yml
@@ -12,7 +12,7 @@ jobs:
     vmImage: $(VM_IMAGE)
   container:
     image: $(DOCKER_BUILD_IMAGE)
-    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged
+    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
   steps:
     - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
     - script: |
@@ -63,7 +63,7 @@ jobs:
     vmImage: $(VM_IMAGE)
   container:
     image: $(DOCKER_BUILD_IMAGE)
-    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged
+    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
   steps:
     - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
     - script: |
@@ -82,7 +82,7 @@ jobs:
     vmImage: $(VM_IMAGE)
   container:
     image: $(DOCKER_BUILD_IMAGE)
-    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged
+    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
   steps:
     - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
     - task: UsePythonVersion@0
@@ -109,7 +109,7 @@ jobs:
     vmImage: $(VM_IMAGE)
   container:
     image: $(DOCKER_BUILD_IMAGE)
-    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged
+    options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --env container=docker
   steps:
     - template: templates/${{ variables.PREPARE_BUILD_TEMPLATE }}
     - task: UsePythonVersion@0
diff --git a/ipatests/azure/azure_definitions/base-fedora.yml b/ipatests/azure/azure_definitions/base-fedora.yml
index 37c86693d3..d9d85840b8 100644
--- a/ipatests/azure/azure_definitions/base-fedora.yml
+++ b/ipatests/azure/azure_definitions/base-fedora.yml
@@ -11,8 +11,6 @@ vms:
     - test_ipaserver
     - test_ipatests_plugins
     - test_xmlrpc/test_dns_plugin.py
-    ignore:
-    - test_ipapython/test_keyring.py
     type: base
 
   - container_job: xmlrpc
diff --git a/ipatests/test_ipapython/test_keyring.py b/ipatests/test_ipapython/test_keyring.py
index dd2237dabf..a43962aa77 100644
--- a/ipatests/test_ipapython/test_keyring.py
+++ b/ipatests/test_ipapython/test_keyring.py
@@ -36,6 +36,9 @@
 SIZE_1024 = 'abcdefgh' * 128
 
 
+@pytest.mark.skip_if_container(
+    "any", reason="kernel keyrings are not namespaced yet"
+)
 class test_keyring:
     """
     Test the kernel keyring interface
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to