Browse Source

Fix kitchen CI

There is no guarntee that pillars are loaded before pillars-from-file
as result we cant assume variables defined via pillars: are available
when pillars-from-file is loaded. Move 'source' definitions of repos to
.kitchen.yml as it uses ENV variable

Change-Id: Id94edd2351f17f5ac130db41a97d3be9cd5f3be4
master
Vasyl Saienko 6 years ago
parent
commit
812de58650
2 changed files with 13 additions and 2 deletions
  1. +13
    -0
      .kitchen.yml
  2. +0
    -2
      tests/pillar/repo_galeracluster.sls

+ 13
- 0
.kitchen.yml View File

base: base:
"*": "*":
- versions - versions
- repos_base
- repos - repos
- galera - galera
versions.sls: versions.sls:
version: version:
mysql: <%= ENV['MYSQL_VER'] || '5.6' %> mysql: <%= ENV['MYSQL_VER'] || '5.6' %>
galera: <%= ENV['GALERA_VER'] || '3' %> galera: <%= ENV['GALERA_VER'] || '3' %>
# NOTE(vsaienko) There is no guarntee that pillars are loaded before pillars-from-file
# as result we cant assume variables defined via pillars: are available when pillars-from-file
# is loaded. Move 'source' definitions of repos to .kitchen.yml as it used ENV variable
repos_base.sls:
linux:
system:
enabled: true
repo:
galeracluster:
source: deb http://releases.galeracluster.com/galera-<%=ENV['GALERA_VER'] || '3'%>/ubuntu {{ grains.get('oscodename') }} main
mysql-wsrep:
source: deb http://releases.galeracluster.com/mysql-wsrep-<%=ENV['MYSQL_VER'] || '5.6'%>/ubuntu {{ grains.get('oscodename') }} main
pillars-from-files: pillars-from-files:
repos.sls: tests/pillar/repo_galeracluster.sls repos.sls: tests/pillar/repo_galeracluster.sls



+ 0
- 2
tests/pillar/repo_galeracluster.sls View File

enabled: true enabled: true
repo: repo:
galeracluster: galeracluster:
source: 'deb http://releases.galeracluster.com/galera-{{ pillar.galera.version.galera }}/ubuntu {{ grains.get('oscodename') }} main'
key_id: BC19DDBA key_id: BC19DDBA
key_server: hkp://p80.pool.sks-keyservers.net:80 key_server: hkp://p80.pool.sks-keyservers.net:80
pin: pin:
priority: 1001 priority: 1001
package: '*' package: '*'
mysql-wsrep: mysql-wsrep:
source: 'deb http://releases.galeracluster.com/mysql-wsrep-{{ pillar.galera.version.mysql }}/ubuntu {{ grains.get('oscodename') }} main'
key_id: BC19DDBA key_id: BC19DDBA
key_server: hkp://p80.pool.sks-keyservers.net:80 key_server: hkp://p80.pool.sks-keyservers.net:80
pin: pin:

Loading…
Cancel
Save