-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yaml
86 lines (84 loc) · 2.83 KB
/
action.yaml
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
name: 'devstack-action'
description: 'Deploy OpenStack with devstack'
inputs:
branch:
description: 'Name of the branch to deploy'
default: 'master'
conf_overrides:
description: 'Configuration overrides for devstack'
default: ''
enabled_services:
description: 'Add or remove services to deploy via devstack'
default: ''
log_dir:
description: 'Directory for logs'
default: '/tmp/devstack-logs'
enable_workaround_docker_io:
description: 'Enable or disable workaround for docker.io'
default: 'true'
force:
description: 'Allow running devstack on unsupported distro'
default: 'no'
runs:
using: "composite"
steps:
- name: Install python pip
run: python -m pip install --upgrade pip
shell: bash
- name: Erase MySQL package
run: sudo apt-get purge mysql-* || true
shell: bash
# This is to avoid RabbitMQ to fail at startup because a wrong version of erlang was installed
- name: Workaround for RabbitMQ
run: |
sudo apt-get purge -y esl-erlang || true
sudo apt-get install -y erlang rabbitmq-server || true
shell: bash
- name: Workaround for docker.io
if: ${{ inputs.enable_workaround_docker_io == 'true' }}
run: |
sudo apt-get install -y runc || true
shell: bash
- name: Remove unwanted packages
run: sudo apt-get purge -y python3-simplejson python3-pyasn1-modules postgresql* || true
shell: bash
- name: Checkout Devstack
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
repository: openstack/devstack
path: ./devstack
- name: Configure devstack
run: |
cat <<EOF > local.conf
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=root
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
SWIFT_HASH=1234123412341234
LOGFILE=${{ inputs.log_dir }}/devstack.log
USE_PYTHON3=True
INSTALL_TEMPEST=False
GIT_BASE=https://github.com
EOF
# horizon does not work in github action, permission error
# dstat log takes too much memory to be stored by log artifacts
# tempest must be disabled otherwise it will get installed still
ENABLED_SERVICES=",-horizon,-dstat,-tempest"
if [[ "${{ inputs.enabled_services }}" != "" ]]; then
ENABLED_SERVICES+=",${{ inputs.enabled_services }}"
fi
echo "ENABLED_SERVICES+=${ENABLED_SERVICES}" >> local.conf
# This must stay at the end to allow any overrides
cat << EOF_CONF_OVERRIDES >> local.conf
${{ inputs.conf_overrides }}
EOF_CONF_OVERRIDES
working-directory: ./devstack
shell: bash
- name: Run devstack
env:
FORCE: ${{ inputs.force }}
run: ./stack.sh
working-directory: ./devstack
shell: bash