From 39ed3f8cb1b0b2b27c4e6ba9099a7b2e2b0d90fb Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 28 Jan 2020 19:20:03 +0000 Subject: [PATCH] Fix git installs for post Neon releases --- .github/workflows/main.yml | 979 ++++++++++++++++++++++-- .github/workflows/templates/generate.py | 22 +- .kitchen.yml | 13 + bootstrap-salt.sh | 334 ++++++-- 4 files changed, 1223 insertions(+), 125 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b058ab..0d9a352 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: py2-stable-2019-2-amazon-2: - name: Amazon 2 2019.2 Py2 Stable + name: Amazon 2 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -86,7 +86,7 @@ jobs: py2-git-2019-2-amazon-2: - name: Amazon 2 2019.2 Py2 Git + name: Amazon 2 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -131,7 +131,7 @@ jobs: py3-stable-2019-2-amazon-2: - name: Amazon 2 2019.2 Py3 Stable + name: Amazon 2 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -176,7 +176,7 @@ jobs: py3-git-2019-2-amazon-2: - name: Amazon 2 2019.2 Py3 Git + name: Amazon 2 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -220,6 +220,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-amazon-2 + py2-git-3000-amazon-2: + name: Amazon 2 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-amazon-2 || bundle exec kitchen create py2-git-3000-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-amazon-2 + + + py3-git-3000-amazon-2: + name: Amazon 2 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-amazon-2 || bundle exec kitchen create py3-git-3000-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-amazon-2 + + latest-amazon-2: name: Amazon 2 Latest packaged release runs-on: ubuntu-latest @@ -266,7 +356,7 @@ jobs: py2-git-2018-3-arch: - name: Arch 2018.3 Py2 Git + name: Arch v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -311,7 +401,7 @@ jobs: py3-git-2018-3-arch: - name: Arch 2018.3 Py3 Git + name: Arch v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -356,7 +446,7 @@ jobs: py2-git-2019-2-arch: - name: Arch 2019.2 Py2 Git + name: Arch v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -401,7 +491,7 @@ jobs: py3-git-2019-2-arch: - name: Arch 2019.2 Py3 Git + name: Arch v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -445,8 +535,98 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-arch + py2-git-3000-arch: + name: Arch v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-arch || bundle exec kitchen create py2-git-3000-arch + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-arch + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-arch + + + py3-git-3000-arch: + name: Arch v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-arch || bundle exec kitchen create py3-git-3000-arch + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-arch + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-arch + + py2-stable-2018-3-centos-6: - name: CentOS 6 2018.3 Py2 Stable + name: CentOS 6 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -491,7 +671,7 @@ jobs: py2-git-2018-3-centos-6: - name: CentOS 6 2018.3 Py2 Git + name: CentOS 6 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -536,7 +716,7 @@ jobs: py2-stable-2019-2-centos-6: - name: CentOS 6 2019.2 Py2 Stable + name: CentOS 6 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -581,7 +761,7 @@ jobs: py2-git-2019-2-centos-6: - name: CentOS 6 2019.2 Py2 Git + name: CentOS 6 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -625,6 +805,51 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-centos-6 + py2-git-3000-centos-6: + name: CentOS 6 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-centos-6 || bundle exec kitchen create py2-git-3000-centos-6 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-centos-6 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-centos-6 + + latest-centos-6: name: CentOS 6 Latest packaged release runs-on: ubuntu-latest @@ -671,7 +896,7 @@ jobs: py2-stable-2018-3-centos-7: - name: CentOS 7 2018.3 Py2 Stable + name: CentOS 7 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -716,7 +941,7 @@ jobs: py2-git-2018-3-centos-7: - name: CentOS 7 2018.3 Py2 Git + name: CentOS 7 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -761,7 +986,7 @@ jobs: py3-stable-2018-3-centos-7: - name: CentOS 7 2018.3 Py3 Stable + name: CentOS 7 v2018.3 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -806,7 +1031,7 @@ jobs: py3-git-2018-3-centos-7: - name: CentOS 7 2018.3 Py3 Git + name: CentOS 7 v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -851,7 +1076,7 @@ jobs: py2-stable-2019-2-centos-7: - name: CentOS 7 2019.2 Py2 Stable + name: CentOS 7 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -896,7 +1121,7 @@ jobs: py2-git-2019-2-centos-7: - name: CentOS 7 2019.2 Py2 Git + name: CentOS 7 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -941,7 +1166,7 @@ jobs: py3-stable-2019-2-centos-7: - name: CentOS 7 2019.2 Py3 Stable + name: CentOS 7 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -986,7 +1211,7 @@ jobs: py3-git-2019-2-centos-7: - name: CentOS 7 2019.2 Py3 Git + name: CentOS 7 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -1030,6 +1255,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-centos-7 + py2-git-3000-centos-7: + name: CentOS 7 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-centos-7 || bundle exec kitchen create py2-git-3000-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-centos-7 + + + py3-git-3000-centos-7: + name: CentOS 7 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-centos-7 || bundle exec kitchen create py3-git-3000-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-centos-7 + + latest-centos-7: name: CentOS 7 Latest packaged release runs-on: ubuntu-latest @@ -1076,7 +1391,7 @@ jobs: py3-stable-2019-2-centos-8: - name: CentOS 8 2019.2 Py3 Stable + name: CentOS 8 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -1121,7 +1436,7 @@ jobs: py3-git-2019-2-centos-8: - name: CentOS 8 2019.2 Py3 Git + name: CentOS 8 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -1165,8 +1480,53 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-centos-8 + py3-git-3000-centos-8: + name: CentOS 8 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-centos-8 || bundle exec kitchen create py3-git-3000-centos-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-centos-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-centos-8 + + py3-stable-2019-2-debian-10: - name: Debian 10 2019.2 Py3 Stable + name: Debian 10 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -1211,7 +1571,7 @@ jobs: py3-git-2019-2-debian-10: - name: Debian 10 2019.2 Py3 Git + name: Debian 10 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -1255,8 +1615,53 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-debian-10 + py3-git-3000-debian-10: + name: Debian 10 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-debian-10 || bundle exec kitchen create py3-git-3000-debian-10 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-debian-10 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-debian-10 + + py2-stable-2018-3-debian-8: - name: Debian 8 2018.3 Py2 Stable + name: Debian 8 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -1301,7 +1706,7 @@ jobs: py2-git-2018-3-debian-8: - name: Debian 8 2018.3 Py2 Git + name: Debian 8 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -1346,7 +1751,7 @@ jobs: py2-stable-2019-2-debian-8: - name: Debian 8 2019.2 Py2 Stable + name: Debian 8 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -1391,7 +1796,7 @@ jobs: py2-git-2019-2-debian-8: - name: Debian 8 2019.2 Py2 Git + name: Debian 8 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -1435,6 +1840,51 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-debian-8 + py2-git-3000-debian-8: + name: Debian 8 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-debian-8 || bundle exec kitchen create py2-git-3000-debian-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-debian-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-debian-8 + + latest-debian-8: name: Debian 8 Latest packaged release runs-on: ubuntu-latest @@ -1481,7 +1931,7 @@ jobs: py2-stable-2018-3-debian-9: - name: Debian 9 2018.3 Py2 Stable + name: Debian 9 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -1526,7 +1976,7 @@ jobs: py2-git-2018-3-debian-9: - name: Debian 9 2018.3 Py2 Git + name: Debian 9 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -1571,7 +2021,7 @@ jobs: py3-stable-2018-3-debian-9: - name: Debian 9 2018.3 Py3 Stable + name: Debian 9 v2018.3 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -1616,7 +2066,7 @@ jobs: py3-git-2018-3-debian-9: - name: Debian 9 2018.3 Py3 Git + name: Debian 9 v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -1661,7 +2111,7 @@ jobs: py2-stable-2019-2-debian-9: - name: Debian 9 2019.2 Py2 Stable + name: Debian 9 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -1706,7 +2156,7 @@ jobs: py2-git-2019-2-debian-9: - name: Debian 9 2019.2 Py2 Git + name: Debian 9 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -1751,7 +2201,7 @@ jobs: py3-stable-2019-2-debian-9: - name: Debian 9 2019.2 Py3 Stable + name: Debian 9 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -1796,7 +2246,7 @@ jobs: py3-git-2019-2-debian-9: - name: Debian 9 2019.2 Py3 Git + name: Debian 9 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -1840,6 +2290,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-debian-9 + py2-git-3000-debian-9: + name: Debian 9 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-debian-9 || bundle exec kitchen create py2-git-3000-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-debian-9 + + + py3-git-3000-debian-9: + name: Debian 9 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-debian-9 || bundle exec kitchen create py3-git-3000-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-debian-9 + + latest-debian-9: name: Debian 9 Latest packaged release runs-on: ubuntu-latest @@ -1886,7 +2426,7 @@ jobs: py2-stable-2018-3-fedora-30: - name: Fedora 30 2018.3 Py2 Stable + name: Fedora 30 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -1931,7 +2471,7 @@ jobs: py2-git-2018-3-fedora-30: - name: Fedora 30 2018.3 Py2 Git + name: Fedora 30 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -1976,7 +2516,7 @@ jobs: py3-stable-2018-3-fedora-30: - name: Fedora 30 2018.3 Py3 Stable + name: Fedora 30 v2018.3 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -2021,7 +2561,7 @@ jobs: py3-git-2018-3-fedora-30: - name: Fedora 30 2018.3 Py3 Git + name: Fedora 30 v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -2066,7 +2606,7 @@ jobs: py2-stable-2019-2-fedora-30: - name: Fedora 30 2019.2 Py2 Stable + name: Fedora 30 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -2111,7 +2651,7 @@ jobs: py2-git-2019-2-fedora-30: - name: Fedora 30 2019.2 Py2 Git + name: Fedora 30 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2156,7 +2696,7 @@ jobs: py3-stable-2019-2-fedora-30: - name: Fedora 30 2019.2 Py3 Stable + name: Fedora 30 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -2201,7 +2741,7 @@ jobs: py3-git-2019-2-fedora-30: - name: Fedora 30 2019.2 Py3 Git + name: Fedora 30 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -2245,6 +2785,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-fedora-30 + py2-git-3000-fedora-30: + name: Fedora 30 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-fedora-30 || bundle exec kitchen create py2-git-3000-fedora-30 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-fedora-30 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-fedora-30 + + + py3-git-3000-fedora-30: + name: Fedora 30 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-fedora-30 || bundle exec kitchen create py3-git-3000-fedora-30 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-fedora-30 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-fedora-30 + + latest-fedora-30: name: Fedora 30 Latest packaged release runs-on: ubuntu-latest @@ -2291,7 +2921,7 @@ jobs: py2-git-2018-3-opensuse-15: - name: Opensuse 15 2018.3 Py2 Git + name: Opensuse 15 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2336,7 +2966,7 @@ jobs: py2-git-2019-2-opensuse-15: - name: Opensuse 15 2019.2 Py2 Git + name: Opensuse 15 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2380,6 +3010,51 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-opensuse-15 + py2-git-3000-opensuse-15: + name: Opensuse 15 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-opensuse-15 || bundle exec kitchen create py2-git-3000-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-opensuse-15 + + latest-opensuse-15: name: Opensuse 15 Latest packaged release runs-on: ubuntu-latest @@ -2426,7 +3101,7 @@ jobs: py2-stable-2018-3-ubuntu-1604: - name: Ubuntu 16.04 2018.3 Py2 Stable + name: Ubuntu 16.04 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -2471,7 +3146,7 @@ jobs: py2-git-2018-3-ubuntu-1604: - name: Ubuntu 16.04 2018.3 Py2 Git + name: Ubuntu 16.04 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2516,7 +3191,7 @@ jobs: py3-stable-2018-3-ubuntu-1604: - name: Ubuntu 16.04 2018.3 Py3 Stable + name: Ubuntu 16.04 v2018.3 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -2561,7 +3236,7 @@ jobs: py3-git-2018-3-ubuntu-1604: - name: Ubuntu 16.04 2018.3 Py3 Git + name: Ubuntu 16.04 v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -2606,7 +3281,7 @@ jobs: py2-stable-2019-2-ubuntu-1604: - name: Ubuntu 16.04 2019.2 Py2 Stable + name: Ubuntu 16.04 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -2651,7 +3326,7 @@ jobs: py2-git-2019-2-ubuntu-1604: - name: Ubuntu 16.04 2019.2 Py2 Git + name: Ubuntu 16.04 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2696,7 +3371,7 @@ jobs: py3-stable-2019-2-ubuntu-1604: - name: Ubuntu 16.04 2019.2 Py3 Stable + name: Ubuntu 16.04 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -2741,7 +3416,7 @@ jobs: py3-git-2019-2-ubuntu-1604: - name: Ubuntu 16.04 2019.2 Py3 Git + name: Ubuntu 16.04 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -2785,6 +3460,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-ubuntu-1604 + py2-git-3000-ubuntu-1604: + name: Ubuntu 16.04 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-ubuntu-1604 || bundle exec kitchen create py2-git-3000-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-ubuntu-1604 + + + py3-git-3000-ubuntu-1604: + name: Ubuntu 16.04 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-ubuntu-1604 || bundle exec kitchen create py3-git-3000-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-ubuntu-1604 + + latest-ubuntu-1604: name: Ubuntu 16.04 Latest packaged release runs-on: ubuntu-latest @@ -2831,7 +3596,7 @@ jobs: py2-stable-2018-3-ubuntu-1804: - name: Ubuntu 18.04 2018.3 Py2 Stable + name: Ubuntu 18.04 v2018.3 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -2876,7 +3641,7 @@ jobs: py2-git-2018-3-ubuntu-1804: - name: Ubuntu 18.04 2018.3 Py2 Git + name: Ubuntu 18.04 v2018.3 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -2921,7 +3686,7 @@ jobs: py3-stable-2018-3-ubuntu-1804: - name: Ubuntu 18.04 2018.3 Py3 Stable + name: Ubuntu 18.04 v2018.3 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -2966,7 +3731,7 @@ jobs: py3-git-2018-3-ubuntu-1804: - name: Ubuntu 18.04 2018.3 Py3 Git + name: Ubuntu 18.04 v2018.3 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -3011,7 +3776,7 @@ jobs: py2-stable-2019-2-ubuntu-1804: - name: Ubuntu 18.04 2019.2 Py2 Stable + name: Ubuntu 18.04 v2019.2 Py2 Stable runs-on: ubuntu-latest needs: Lint @@ -3056,7 +3821,7 @@ jobs: py2-git-2019-2-ubuntu-1804: - name: Ubuntu 18.04 2019.2 Py2 Git + name: Ubuntu 18.04 v2019.2 Py2 Git runs-on: ubuntu-latest needs: Lint @@ -3101,7 +3866,7 @@ jobs: py3-stable-2019-2-ubuntu-1804: - name: Ubuntu 18.04 2019.2 Py3 Stable + name: Ubuntu 18.04 v2019.2 Py3 Stable runs-on: ubuntu-latest needs: Lint @@ -3146,7 +3911,7 @@ jobs: py3-git-2019-2-ubuntu-1804: - name: Ubuntu 18.04 2019.2 Py3 Git + name: Ubuntu 18.04 v2019.2 Py3 Git runs-on: ubuntu-latest needs: Lint @@ -3190,6 +3955,96 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-ubuntu-1804 + py2-git-3000-ubuntu-1804: + name: Ubuntu 18.04 v3000 Py2 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-3000-ubuntu-1804 || bundle exec kitchen create py2-git-3000-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-3000-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-3000-ubuntu-1804 + + + py3-git-3000-ubuntu-1804: + name: Ubuntu 18.04 v3000 Py3 Git + runs-on: ubuntu-latest + + needs: Lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-ubuntu-1804 || bundle exec kitchen create py3-git-3000-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-ubuntu-1804 + + latest-ubuntu-1804: name: Ubuntu 18.04 Latest packaged release runs-on: ubuntu-latest diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 8fe946d..a912db8 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -60,10 +60,22 @@ BLACKLIST_2018 = [ SALT_BRANCHES = [ '2018-3', '2019-2', + '3000', 'latest' ] -LATEST_BLACKLIST = [ +BRANCH_DISPLAY_NAMES = { + '2018-3': 'v2018.3', + '2019-2': 'v2019.2', + '3000': 'v3000', + 'latest': 'Latest' +} + +STABLE_BRANCH_BLACKLIST = [ + '3000' +] + +LATEST_PKG_BLACKLIST = [ 'arch', # No packages are built 'centos-8', # Once Neon is out, this can be removed from here 'debian-10' # Once Neon is out, this can be removed from here @@ -93,7 +105,7 @@ def generate_test_jobs(): for distro in LINUX_DISTROS + OSX + WINDOWS: for branch in SALT_BRANCHES: if branch == 'latest': - if distro in LATEST_BLACKLIST: + if distro in LATEST_PKG_BLACKLIST: continue if distro in LINUX_DISTROS: template = 'linux.yml' @@ -118,11 +130,15 @@ def generate_test_jobs(): ) ) continue + for python_version in ('py2', 'py3'): for bootstrap_type in ('stable', 'git'): if bootstrap_type == 'stable' and distro not in STABLE_DISTROS: continue + if bootstrap_type == 'stable' and branch in STABLE_BRANCH_BLACKLIST: + continue + if branch == '2018-3' and distro in BLACKLIST_2018: continue @@ -150,7 +166,7 @@ def generate_test_jobs(): bootstrap_type=bootstrap_type, display_name='{} {} {} {}'.format( DISTRO_DISPLAY_NAMES[distro], - branch.replace('-', '.'), + BRANCH_DISPLAY_NAMES[branch], python_version.capitalize(), bootstrap_type.capitalize() ) diff --git a/.kitchen.yml b/.kitchen.yml index 9958420..3c5faba 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -105,6 +105,9 @@ suites: - name: py2-git-2019-2 provisioner: salt_version: 2019.2 + - name: py2-git-3000 + provisioner: + salt_version: 3000.0rc2 - name: py2-git-master provisioner: salt_version: master @@ -122,6 +125,7 @@ suites: excludes: - arch - opensuse-15 + - name: py3-git-2018-3 provisioner: salt_version: 2018.3 @@ -132,6 +136,15 @@ suites: - debian-8 - opensuse-15 - amazon-2 + - name: py3-git-3000 + provisioner: + salt_version: 3000.0rc2 + salt_bootstrap_options: -x python3 -MPfq git %s + excludes: + - amazon-1 + - centos-6 + - debian-8 + - opensuse-15 - name: py3-git-2019-2 provisioner: salt_version: 2019.2 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c49f4e5..8ace425 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -271,6 +271,7 @@ _REPO_URL="repo.saltstack.com" _PY_EXE="" _INSTALL_PY="$BS_FALSE" _TORNADO_MAX_PY3_VERSION="5.0" +_POST_NEON_INSTALL=$BS_FALSE # Defaults for install arguments ITYPE="stable" @@ -1817,6 +1818,61 @@ if [ "${DISTRO_NAME_L}" != "ubuntu" ] && [ $_PIP_ALL -eq $BS_TRUE ]; then exit 1 fi +if [ "$ITYPE" = "git" ]; then + + if [ "${GIT_REV}" = "master" ]; then + _POST_NEON_INSTALL=$BS_TRUE + __TAG_REGEX_MATCH="MATCH" + else + case ${OS_NAME_L} in + openbsd|freebsd|netbsd|darwin ) + __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?3[0-9]{3}(\.[0-9]{1,2})?).*$/MATCH/') + if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then + _POST_NEON_INSTALL=$BS_TRUE + __TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}" + if [ "$(echo "${GIT_REV}" | cut -c -1)" != "v" ]; then + # We do this to properly clone tags + GIT_REV="v${GIT_REV}" + fi + echodebug "Post Neon Tag Regex Match On: ${GIT_REV}" + else + __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/') + echodebug "Pre Neon Tag Regex Match On: ${GIT_REV}" + fi + ;; + * ) + __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?3[[:digit:]]\{3\}\(\.[[:digit:]]\{1,2\}\)\?\).*$/MATCH/') + if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then + _POST_NEON_INSTALL=$BS_TRUE + __TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}" + if [ "$(echo "${GIT_REV}" | cut -c -1)" != "v" ]; then + # We do this to properly clone tags + GIT_REV="v${GIT_REV}" + fi + echodebug "Post Neon Tag Regex Match On: ${GIT_REV}" + else + __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/') + echodebug "Pre Neon Tag Regex Match On: ${GIT_REV}" + fi + ;; + esac + fi + + if [ "$_POST_NEON_INSTALL" -eq $BS_TRUE ]; then + echo + echowarn "Post Neon git based installations will always install salt and it's dependencies using pip" + echowarn "You have 10 seconds to cancel and stop the bootstrap process" + echo + sleep 10 + _PIP_ALLOWED=$BS_TRUE + # Let's trigger config_salt() + if [ "$_TEMP_CONFIG_DIR" = "null" ]; then + _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" + CONFIG_SALT_FUNC="config_salt" + fi + fi +fi + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __function_defined @@ -1981,31 +2037,6 @@ __git_clone_and_checkout() { export GIT_SSL_NO_VERIFY=1 fi - case ${OS_NAME_L} in - openbsd|freebsd|netbsd|darwin ) - __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/') - ;; - * ) - __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/') - ;; - esac - - if [ "$__TAG_REGEX_MATCH" != "MATCH" ]; then - case ${OS_NAME_L} in - openbsd|freebsd|netbsd|darwin ) - __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?3[0-9]{3}(\.[0-9]{1,2})?).*$/MATCH/') - ;; - * ) - __NEW_VS_TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?3[[:digit:]]\{3\}\(\.[[:digit:]]\{1,2\}\)\?\).*$/MATCH/') - ;; - esac - - if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then - __TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}" - fi - fi - - __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${_SALT_GIT_CHECKOUT_DIR}" 2>/dev/null) __SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}" __SALT_CHECKOUT_REPONAME="$(basename "${_SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)" @@ -2599,6 +2630,48 @@ __install_pip_deps() { pip install -U -r ${requirements_file} ${__PIP_PACKAGES} } # ---------- end of function __install_pip_deps ---------- +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __install_salt_from_repo_post_neon +# DESCRIPTION: Return 0 or 1 if successfully able to install. Can provide a different python version to +# install pip packages with. If $py_exe is not specified it will use the default python version. +# PARAMETERS: py_exe +#---------------------------------------------------------------------------------------------------------------------- +__install_salt_from_repo_post_neon() { + _py_exe="$1" + + if [ "${_py_exe}" = "" ]; then + _py_exe='python' + fi + + echodebug "__install_salt_from_repo_post_neon py_exe=$_py_exe" + + _py_pkg=$(echo "$_py_exe" | sed -E "s/\\.//g") + _pip_cmd="${_py_exe} -m pip" + + __check_pip_allowed + + # Install pip and pip dependencies + if ! __check_command_exists "${_pip_cmd} --version"; then + __PACKAGES="${_py_pkg}-pip gcc" + # shellcheck disable=SC2086 + if [ "$DISTRO_NAME_L" = "debian" ];then + __PACKAGES="${__PACKAGES} ${_py_pkg}-dev" + __apt_get_install_noinput ${__PACKAGES} || return 1 + else + __PACKAGES="${__PACKAGES} ${_py_pkg}-devel" + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + fi + + ${_pip_cmd} install -U pip + + echoinfo "Installing salt using ${_py_exe}" + cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 + + ${_pip_cmd} install . || return 1 +} # ---------- end of function __install_salt_from_repo_post_neon ---------- + ####################################################################################################################### # @@ -2840,6 +2913,10 @@ install_ubuntu_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="" # See how we are installing packages @@ -2927,6 +3004,11 @@ install_ubuntu_git() { _PYEXE=python2.7 fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then # shellcheck disable=SC2086 "${_PYEXE}" setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1 @@ -3209,6 +3291,10 @@ install_debian_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname" __PACKAGES="${__PACKAGES} python-crypto python-jinja2 python-msgpack python-m2crypto" __PACKAGES="${__PACKAGES} python-requests python-tornado python-yaml python-zmq" @@ -3250,6 +3336,10 @@ install_debian_8_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2" __PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd" __PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures" @@ -3314,6 +3404,10 @@ install_debian_9_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="libzmq5 lsb-release" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then @@ -3349,6 +3443,10 @@ install_debian_9_git_deps() { install_debian_10_git_deps() { install_debian_git_pre || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then _py=${_PY_EXE} PY_PKG_VER=3 @@ -3413,6 +3511,11 @@ install_debian_git() { _PYEXE=python fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then # shellcheck disable=SC2086 "${_PYEXE}" setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1 @@ -3617,12 +3720,21 @@ install_fedora_git_deps() { fi __PACKAGES="${__PACKAGES:=}" - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __PACKAGES="${__PACKAGES} ca-certificates" - fi if ! __check_command_exists git; then __PACKAGES="${__PACKAGES} git" fi + install_fedora_deps || return 1 + + __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + + __PACKAGES="${__PACKAGES:=}" + if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then + __PACKAGES="${__PACKAGES} ca-certificates" + fi if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" fi @@ -3636,8 +3748,6 @@ install_fedora_git_deps() { install_fedora_deps || return 1 - __git_clone_and_checkout || return 1 - # Fedora 28+ needs tornado <5.0 from pip # https://github.com/saltstack/salt-bootstrap/issues/1220 if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then @@ -3665,6 +3775,11 @@ install_fedora_git() { _PYEXE='python2' fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then ${_PYEXE} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --prefix=/usr || return 1 else @@ -3825,26 +3940,28 @@ install_centos_stable_deps() { __PACKAGES="yum-utils chkconfig" fi - if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then - # YAML module is used for generating custom master/minion configs - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - __PACKAGES="${__PACKAGES} python3-pyyaml" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python3-pyyaml" + else + __PACKAGES="${__PACKAGES} python2-pyyaml" + fi + elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python36-PyYAML" + else + __PACKAGES="${__PACKAGES} PyYAML" + fi else - __PACKAGES="${__PACKAGES} python2-pyyaml" - fi - elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then - # YAML module is used for generating custom master/minion configs - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - __PACKAGES="${__PACKAGES} python36-PyYAML" - else - __PACKAGES="${__PACKAGES} PyYAML" - fi - else - # YAML module is used for generating custom master/minion configs - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - __PACKAGES="${__PACKAGES} python34-PyYAML" - else - __PACKAGES="${__PACKAGES} PyYAML" + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python34-PyYAML" + else + __PACKAGES="${__PACKAGES} PyYAML" + fi fi fi @@ -3927,6 +4044,9 @@ install_centos_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi __PACKAGES="" _install_m2crypto_req=false @@ -4025,6 +4145,12 @@ install_centos_git() { _PYEXE='python2' fi + echodebug "_PY_EXE: $_PY_EXE" + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then $_PYEXE setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --prefix=/usr || return 1 else @@ -4555,16 +4681,22 @@ install_alpine_linux_stable_deps() { install_alpine_linux_git_deps() { install_alpine_linux_stable_deps || return 1 - apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ - py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ - py2-zmq zeromq py2-requests || return 1 - if ! __check_command_exists git; then apk -U add git || return 1 fi __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + apk -U add python2 py2-pip || return 1 + _PY_EXE=python2 + return 0 + fi + + apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ + py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ + py2-zmq zeromq py2-requests || return 1 + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the master branch, install whichever tornado is on the requirements file __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" @@ -4602,6 +4734,12 @@ install_alpine_linux_stable() { } install_alpine_linux_git() { + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then python2 setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install || return 1 else @@ -4810,6 +4948,10 @@ install_amazon_linux_ami_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="" __PIP_PACKAGES="" @@ -4875,6 +5017,10 @@ install_amazon_linux_ami_2_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PACKAGES="" __PIP_PACKAGES="" @@ -5133,13 +5279,18 @@ install_arch_linux_git_deps() { if ! __check_command_exists git; then pacman -Sy --noconfirm --needed git || return 1 fi + + __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + pacman -R --noconfirm python2-distribute pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ python2-m2crypto python2-futures python2-markupsafe python2-msgpack python2-psutil \ python2-pyzmq zeromq python2-requests python2-systemd || return 1 - __git_clone_and_checkout || return 1 - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the master branch, install whichever tornado is on the requirements file __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" @@ -5175,6 +5326,12 @@ install_arch_linux_stable() { } install_arch_linux_git() { + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then python2 setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install || return 1 else @@ -5322,11 +5479,14 @@ install_freebsd_git_deps() { if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 fi + __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi /usr/local/sbin/pkg install -y py37-requests || return 1 - __git_clone_and_checkout || return 1 - echodebug "Adapting paths to FreeBSD" # The list of files was taken from Salt's BSD port Makefile for file in doc/man/salt-key.1 doc/man/salt-cp.1 doc/man/salt-minion.1 \ @@ -5381,6 +5541,11 @@ install_freebsd_git() { __PYTHON_PATH=$(readlink -f "$(command -v python3)") __ESCAPED_PYTHON_PATH=$(echo "${__PYTHON_PATH}" | sed 's/\//\\\//g') + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${__PYTHON_PATH}" || return 1 + return 0 + fi + # Install from git if [ ! -f salt/syspaths.py ]; then # We still can't provide the system paths, salt 0.16.x @@ -5486,6 +5651,11 @@ install_openbsd_git_deps() { _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" CONFIG_SALT_FUNC="config_salt" fi + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + return 0 } @@ -5493,6 +5663,11 @@ install_openbsd_git() { # # Install from git # + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ ! -f salt/syspaths.py ]; then # We still can't provide the system paths, salt 0.16.x /usr/local/bin/python2.7 setup.py ${SETUP_PY_INSTALL_ARGS} install || return 1 @@ -5611,6 +5786,12 @@ install_smartos_git_deps() { pkgin -y install git || return 1 fi + __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # Install whichever tornado is in the requirements file __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" @@ -5635,7 +5816,6 @@ install_smartos_git_deps() { fi fi - __git_clone_and_checkout || return 1 # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -5651,6 +5831,12 @@ install_smartos_stable() { } install_smartos_git() { + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + # Use setuptools in order to also install dependencies # lets force our config path on the setup for now, since salt/syspaths.py only got fixed in 2015.5.0 USE_SETUPTOOLS=1 /opt/local/bin/python setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install || return 1 @@ -5878,10 +6064,14 @@ install_opensuse_git_deps() { __zypper_install git || return 1 fi - __zypper_install patch || return 1 - __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + + __zypper_install patch || return 1 + __PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures" if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then @@ -5931,6 +6121,12 @@ install_opensuse_stable() { } install_opensuse_git() { + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + python setup.py ${SETUP_PY_INSTALL_ARGS} install --prefix=/usr || return 1 return 0 } @@ -6087,6 +6283,10 @@ install_opensuse_15_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + # Py3 is the default bootstrap install for Leap 15 # However, git installs might specify "-x python2" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then @@ -6136,6 +6336,11 @@ install_opensuse_15_git() { _PYEXE=python3 fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + ${_PYEXE} setup.py ${SETUP_PY_INSTALL_ARGS} install --prefix=/usr || return 1 return 0 } @@ -6662,6 +6867,10 @@ install_macosx_git_deps() { __git_clone_and_checkout || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + return 0 + fi + __PIP_REQUIREMENTS="dev_python27.txt" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then __PIP_REQUIREMENTS="dev_python34.txt" @@ -6691,6 +6900,11 @@ install_macosx_git() { _PYEXE=python2.7 fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + return 0 + fi + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then $_PYEXE setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --prefix=/opt/salt || return 1 else