-
Notifications
You must be signed in to change notification settings - Fork 33
90 lines (81 loc) · 2.67 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "docker integration"
on:
workflow_call:
inputs:
scenario:
type: string
description: molecule scenario
required: false
default: "false"
os_distribution:
type: string
description: OS image to use for the container
required: false
default: rockylinux:9
galaxy_cache:
type: string
description: an identifier for the Ansible galaxy cache (e.g. calling workflow name)
required: false
default: ansible-galaxy
dtas_version:
type: string
description: git ref to use when cloning DTAS repo
required: false
default: master
dtas_additional_params:
type: string
description: additional parameters to pass to DTAS
required: false
default: ""
runner:
type: string
description: runner to use for the job
required: false
default: ubuntu-latest
secrets:
nexus_username:
required: false
nexus_password:
required: false
dtas_token:
required: false
env:
DTAS_VERSION: ${{ inputs.dtas_version }}
DTAS_ADDITIONAL_PARAMS: ${{ inputs.dtas_additional_params }}
BUILD_NUMBER: ${{ github.run_id }}
PY_COLORS: 1
PYTHONUNBUFFERED: 1
jobs:
docker_integration:
name: Test ${{ inputs.scenario }} scenario on ${{ inputs.os_distribution }}
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# avoid auth conflict when cloning DTAS during verify step
persist-credentials: false
- name: Setup Python
uses: ./.github/actions/setup-python
id: setup-python
- name: Install python packages
uses: Alfresco/alfresco-build-tools/.github/actions/pipenv@a0837df06d10de2cae8a99319e8e101a6cbe9083 # v8.4.0
with:
python-version: ${{ steps.setup-python.outputs.python-version }}
- name: Install and cache ansible galaxy dependencies
uses: ./.github/actions/galaxy
with:
cache-name: ${{ inputs.galaxy_cache }}
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Cache downloads
uses: ./.github/actions/cache-downloads
with:
cache-name: ${{ inputs.galaxy_cache }}
- name: Run tests
env:
MOLECULE_ROLE_IMAGE: ${{ inputs.os_distribution }}
NEXUS_USERNAME: ${{ secrets.nexus_username }}
NEXUS_PASSWORD: ${{ secrets.nexus_password }}
CLONE_GITHUB_TOKEN: ${{ secrets.dtas_token }}
run: pipenv run molecule test -s ${{ inputs.scenario }}