-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsnapcraft.yaml
182 lines (180 loc) · 6.14 KB
/
snapcraft.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: fcbtest
version: "1"
summary: fcbtesе is Rally + Tempest + refstack tests
description: |
Snap for running tests for Openstack platform using Rally framework, Tempest verifier and tests from refstack.
base: core18
grade: stable
# classic confinement is used as rally uses the 'multiprocessing' python module
# which uses shared memory and accesses paths blocked via AppArmor policies of
# snapd which leads to segfaults when any of the rally tools are used
# see https://bugs.launchpad.net/snapcraft/+bug/1577514
# https://forum.snapcraft.io/t/python-multiprocessing-sem-open-blocked-in-strict-mode/962
confinement: strict
environment:
PATH: $SNAP/bin:$SNAP/usr/bin:$PATH # :$SNAP/testrepository:
PYTHONPATH: $SNAP/lib/python3.6/site-packages:$SNAP/bin/rally
# see
# https://github.com/GoogleCloudPlatform/google-auth-library-python/issues/249
# https://github.com/ubuntu/ubuntu-make/issues/536#issuecomment-382112564
# https://www.python.org/dev/peps/pep-0420/
PYTHONHOME: $SNAP/usr
SNAP_SHM_PREFIX: "snap.${SNAP_NAME}."
apps:
fcbtest:
command: echo "Usage - 0) SOURCE YOUR NOVARC 1)fcbtest.rallyinit 2) fcbtest.tempestinit 3) fcbtest.rally verify start"
plugs: [home, network, network-bind]
rally:
command: rally
plugs: [home, network, network-bind]
rallymanage:
command: rally-manage
plugs: [home, network, network-bind]
rallyinit:
command: bin/rallyinit.sh
plugs: [home, network, network-bind]
tempestinit:
command: bin/tempestinit.sh
plugs: [home, network, network-bind]
parts:
rally:
after: [patches]
plugin: python
python-version: python3
stage-packages:
- iputils-ping
- libdb5.3
- zlib1g
- libcomerr2
- libgcc1
- libbz2-1.0
- libblkid1
- libcap2
- libgcrypt20
- libgpg-error0
- liblzma5
- libmount1
- libncursesw5
- libselinux1
- libtinfo5
- libuuid1
- libstdc++6
- libpcre3
build-packages: [python3, python3-pip, build-essential, libffi-dev, libpq-dev, libssl-dev, libxml2-dev, libxslt1-dev, python3-dev, iputils-ping, zlib1g, libcomerr2, libgcc1]
source: https://github.com/openstack/rally
source-type: git
source-tag: '1.4.1'
requirements: [requirements.txt]
constraints: [upper-constraints.txt]
override-pull: |
snapcraftctl pull
git config user.email "[email protected]"
git config user.name "[email protected]"
git am $SNAPCRAFT_STAGE/0001-Task-context-implement-comparison-operators.patch
patches:
source: patches
plugin: dump
prime:
- -*
rally-openstack:
# python3 compatibility patches for tempest verifier
after: [patches]
plugin: python
python-version: python3
build-packages: [python3, python3-pip, build-essential, libffi-dev, libpq-dev, libssl-dev, libxml2-dev, libxslt1-dev, python3-dev, iputils-ping, zlib1g, libcomerr2, libgcc1]
source: https://github.com/openstack/rally-openstack
source-type: git
source-commit: 992419828496abe48a6dedc71416ea8bebb87e77
requirements: [requirements.txt]
constraints: [upper-constraints.txt]
stage-packages:
- git # for tempest repository cloning
override-pull: |
snapcraftctl pull
git config user.email "[email protected]"
git config user.name "[email protected]"
git am $SNAPCRAFT_STAGE/0001-py3-use-binary-mode-for-opening-image-files.patch
tempest:
after: [rally, patches]
plugin: python
source: https://github.com/openstack/tempest
source-type: git
# take a specific tempest version
source-tag: '19.0.0'
requirements: [requirements.txt]
filesets:
exclude-conflicting-files:
- -lib/python3.6/site-packages/dateutil
include-all:
- ./*
stage:
- $include-all
- $exclude-conflicting-files
override-pull: |
snapcraftctl pull
git config user.email "[email protected]"
git config user.name "[email protected]"
git am $SNAPCRAFT_STAGE/0001-Make-create_user-domain-aware-for-V3CredsClient.patch
tempest-dump:
after: [rally, tempest, patches]
plugin: dump
source: https://github.com/openstack/tempest
source-type: git
# take a specific tempest version
source-tag: '19.0.0'
# do nothing as we override the prime step
# and do not need to stage or build anything
override-pull: |
snapcraftctl pull
git config user.email "[email protected]"
git config user.name "[email protected]"
git am $SNAPCRAFT_STAGE/0001-Make-create_user-domain-aware-for-V3CredsClient.patch
git tag 19.0.0-patched-for-lp1613819
override-stage: |
:
override-build: |
:
# rally expects tempest source with .git present
# which means we have to clone the repo into the
# target directory, including the hidden dir
override-prime: |
rm -fr $SNAPCRAFT_PRIME/tempest
git clone $SNAPCRAFT_PART_SRC $SNAPCRAFT_PRIME/tempest
barbican-tempest-plugin:
after: [rally, tempest-dump]
plugin: dump
source: https://github.com/openstack/barbican-tempest-plugin
source-type: git
source-commit: 123dd7d4162c39a1cb4b4c1b09a5dceaee127eb6
# do nothing as we override the prime step
# and do not need to stage or build anything
override-stage: |
:
override-build: |
:
# rally expects tempest source with .git present
# which means we have to clone the repo into the
# target directory, including the hidden dir
override-prime: |
rm -fr $SNAPCRAFT_PRIME/barbican-tempest-plugin
git clone $SNAPCRAFT_PART_SRC $SNAPCRAFT_PRIME/barbican-tempest-plugin
copy-parts:
after: [tempest-dump]
plugin: dump
source: ./
organize:
rallyinit.sh: bin/rallyinit.sh
tempestinit.sh: bin/tempestinit.sh
stage:
- bin/*
- 2018.02-test-list.txt
libc-shm-shim:
plugin: nil
override-build: |
snap download libc-shm-shim --beta
unsquashfs -f -d ${SNAPCRAFT_PART_INSTALL} libc-shm-shim_*.snap
build-packages:
- squashfs-tools
stage:
- -meta
- -snap