mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
This adds the capabilities SYS_ADMIN and SYSLOG to the container_create call in build.sh as long as server deployment has been enabled. The privileged option has been removed as it is no longer needed. The hostnamectl-wrapper for the container has been removed as it is no longer needed.
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
---
|
|
parameters:
|
|
- name: distro
|
|
type: string
|
|
- name: python_version
|
|
type: string
|
|
default: 3.x
|
|
- name: ansible_core_version
|
|
default: ""
|
|
|
|
jobs:
|
|
- job: BuildTestImage_${{ join('_', split(parameters.distro, '-')) }}
|
|
displayName: Build ${{ parameters.distro }} test container
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '${{ parameters.python_version }}'
|
|
|
|
- script: python -m pip install --upgrade pip "ansible-core${{ parameters.ansible_core_version }}"
|
|
retryCountOnTaskFailure: 5
|
|
displayName: Install tools
|
|
|
|
- script: ansible-galaxy collection install containers.podman
|
|
displayName: Install Ansible Galaxy collections
|
|
|
|
- script: infra/image/build.sh -s ${{ parameters.distro }}
|
|
displayName: Build ${{ parameters.distro }} base image
|
|
env:
|
|
ANSIBLE_ROLES_PATH: "${PWD}/roles"
|
|
ANSIBLE_LIBRARY: "${PWD}/plugins/modules"
|
|
ANSIBLE_MODULE_UTILS: "${PWD}/plugins/module_utils"
|
|
|
|
- script: podman login -u="$QUAY_ROBOT_USERNAME" -p="$QUAY_ROBOT_TOKEN" quay.io
|
|
displayName: Registry login
|
|
env:
|
|
# Secrets needs to be mapped as env vars to work properly
|
|
QUAY_ROBOT_TOKEN: $(QUAY_ROBOT_TOKEN)
|
|
|
|
- script: |
|
|
podman push quay.io/ansible-freeipa/upstream-tests:${{parameters.distro}}-base quay.io/ansible-freeipa/upstream-tests:${{ parameters.distro }}-base
|
|
displayName: Push base image
|
|
|
|
- script: |
|
|
podman push quay.io/ansible-freeipa/upstream-tests:${{ parameters.distro }}-server quay.io/ansible-freeipa/upstream-tests:${{ parameters.distro }}-server
|
|
displayName: Push server image
|