mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
upstream ci: Move Azure scripts to infra directory
Move Azure scripts to infra directory, as only roles and modules test playbooks should exist in the tests directory.
This commit is contained in:
50
infra/azure/templates/build_container.yml
Normal file
50
infra/azure/templates/build_container.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
parameters:
|
||||
- name: job_name_suffix
|
||||
type: string
|
||||
- name: distro
|
||||
type: string
|
||||
- name: python_version
|
||||
type: string
|
||||
default: 3.x
|
||||
- name: ansible_core_version
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
- job: BuildTestImage${{ parameters.job_name_suffix }}
|
||||
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: |
|
||||
rm -rf ~/.ansible
|
||||
mkdir -p ~/.ansible
|
||||
ln -snf $(readlink -f roles) ~/.ansible/roles
|
||||
ln -snf $(readlink -f plugins) ~/.ansible/plugins
|
||||
displayName: Setup ansible-freeipa using Git repository
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user