Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a venv with previous ansible version for upgrades
When doing the role upgrade, we run every playbook with current's branch ansible. This is normal for the infrastructure bits (which are running on current branch), but not for the installation of the previous branch's role, which should use previous branch's environment. This commit adds: - A new venv build script, containing the previous version of ansible - A split between the infrastructure bits (running current ansible), the previous role run, and the upgrade of the role. Change-Id: I91fe4e867750d7cee9ad7d84b005eb0231849df9 Signed-off-by: Jean-Philippe Evrard <jean-philippe@evrard.me> Closes-Bug: #1741471
- Loading branch information
Showing
3 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# Copyright 2018, Rackspace US, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
## Shell Opts ---------------------------------------------------------------- | ||
|
||
set -e | ||
|
||
## Vars ---------------------------------------------------------------------- | ||
|
||
export WORKING_DIR=${WORKING_DIR:-$(pwd)} | ||
export PREVIOUS_VENV=${PREVIOUS_VENV:-"ansible-previous"} | ||
|
||
|
||
pushd ${WORKING_DIR}/.tox | ||
virtualenv ${PREVIOUS_VENV} | ||
${PREVIOUS_VENV}/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike \ | ||
-rhttps://git.openstack.org/cgit/openstack/openstack-ansible/plain/global-requirement-pins.txt?h=stable/pike \ | ||
-r${WORKING_DIR}/tests/common/previous/test-ansible-deps.txt | ||
# Display venv contents | ||
${PREVIOUS_VENV}/bin/pip freeze | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters