diff --git a/.gitignore b/.gitignore index f15c60a..eef4121 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ *.retry inventory -3scale-inventory.* +3scale-inventory.yaml bin diff --git a/.travis.yml b/.travis.yml index 3bc437e..32241d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: python matrix: include: - python: '2.7' - env: ANSIBLE_VERSION=2.4.6 + env: ANSIBLE_VERSION=2.4.6 THREESCALE_POOL=0 - python: '3.6' - env: ANSIBLE_VERSION=2.7.5 + env: ANSIBLE_VERSION=2.7.5 THREESCALE_POOL=1 install: - pip install ansible==$ANSIBLE_VERSION - pip install jmespath @@ -19,12 +19,11 @@ script: - ansible-playbook -v -i tests/inventory tests/3scale-saas-with-hosted-apicast-multi-environment.yml - ansible-playbook -v -i tests/inventory tests/3scale-saas-with-hosted-apicast-with-smoketest-in-extra-vars.yml - ansible-playbook -v -i tests/inventory tests/3scale-saas-with-hosted-apicast-without-smoketest.yml -env: - global: - # travis encrypt "THREESCALE_INVENTORY=$(yaml2json tests/3scale-inventory.yaml|base64)" - secure: "SKrCC5Nd1lXFU9mCrmGUSbqmEFGzT6/3KTXGQ/bASgSx4r0AuDHt48cI/XPQ6XGCIGaxAt2oRWzJZJ00+Y+5A1TCYAXI4X75mTVl+mgZ3ul5hSK1/KfPPoLciZIcv678FLmmpryNRapK+zxG+OKR1puNFQm9himhF9x0JICigFZSVLMLGnpvHDo2GguFv+4aO1tkdZMT5IzBlPD11Kn98QVCruF/dHiBXtSxuo5ja0/uDsGotMcUQRNa637WIQ5D7YgDREpeLrHzmbpW2zr7HI30oA68k+BxZFqlQ/cyI7f5ogNE73ID+FBSSxVXqcn7TD2nmYL3NQpMztTCzM6YlODIuAvdWUxggeBJflpIVoza0HLP7CB76GAmRSkvwGbnGAHWvCOtvczmJ/hXGgAEdRL5q3eJiGebRvhb6SAVMZ3LOH9LlLU9fKDVGqzolFi4+Jaxami600zgBB/yGkFckpapUZLEK2O0QdHBu3bjd7+9C0EgYONrbyMMkMoWr8TiX/y0qTHg3SclOEacDqLw3kb0MAe9V9WtE+MKOAM38lkXN1v1J9x2izeEqKBDDuzxMOsRxQwfSlA5MVW1kOiKaQgKl37F5t+msfIsPDlr2DRM4JTsIBaQKMY9E50tQ0cMW+vU7P+kn8UlNdTh53TLwKMjPcU99XG1f95fGAMocAA=" notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ branches: except: - /^dev.*/ +before_install: +- openssl aes-256-cbc -K $encrypted_7bf6043000c3_key -iv $encrypted_7bf6043000c3_iv + -in tests/3scale-inventory.yaml.enc -out tests/3scale-inventory.yaml -d diff --git a/tests/3scale-inventory.yaml.enc b/tests/3scale-inventory.yaml.enc new file mode 100644 index 0000000..a51a212 --- /dev/null +++ b/tests/3scale-inventory.yaml.enc @@ -0,0 +1,6 @@ + fDu>'Grjq+CP)[JzDZa)vד~R(EG'%fe{vM𢎽)]=?$ faW/f +d;:7;|pQ8* IYIΛ)ȁf \ No newline at end of file diff --git a/tests/write-inventory-files.yml b/tests/write-inventory-files.yml index 1fe066a..0d7e8f8 100644 --- a/tests/write-inventory-files.yml +++ b/tests/write-inventory-files.yml @@ -21,6 +21,12 @@ recurse: no register: templates + - name: Select the target CI platform using the THREESCALE_POOL environment variable + set_fact: + threescale_inventory: '{{ threescale_inventory[env|int] }}' + vars: + env: '{{ lookup(''env'', ''THREESCALE_POOL'') }}' + - name: Process the Jinja2 templates template: src: '{{ item }}'