forked from ansible-collections/ibm_zos_cics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (66 loc) · 2.11 KB
/
.travis.yml
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
language: python
python:
- "2.7"
- "3.8"
- "3.9"
- "3.10"
env:
- ANSIBLE_VERSION="stable-2.11"
- ANSIBLE_VERSION="stable-2.12"
- ANSIBLE_VERSION="stable-2.13"
- ANSIBLE_VERSION="stable-2.14"
- ANSIBLE_VERSION="stable-2.15"
- ANSIBLE_VERSION="devel"
matrix:
exclude:
# Python 2.7 max ansible version is 2.11
- python: "2.7"
env: ANSIBLE_VERSION="stable-2.12"
- python: "2.7"
env: ANSIBLE_VERSION="stable-2.13"
- python: "2.7"
env: ANSIBLE_VERSION="stable-2.14"
- python: "2.7"
env: ANSIBLE_VERSION="stable-2.15"
- python: "2.7"
env: ANSIBLE_VERSION="devel"
# Python 3.8 max ansible version is 2.13
- python: "3.8"
env: ANSIBLE_VERSION="stable-2.14"
- python: "3.8"
env: ANSIBLE_VERSION="stable-2.15"
- python: "3.8"
env: ANSIBLE_VERSION="devel"
# Ansible 2.11 max python version support is 3.9
- python: "3.10"
env: ANSIBLE_VERSION="stable-2.11"
services:
- docker
before_script: source .travis/get_vault_data.sh
script: |
echo ""
echo "#############################################"
echo "# PYTHON VERSION: ${TRAVIS_PYTHON_VERSION}"
echo "# ANSIBLE VERSION: ${ANSIBLE_VERSION}"
echo "#############################################"
echo ""
ANSIBLE_NO_STABLE="${ANSIBLE_VERSION//stable-/}"
ANSIBLE_NO_DOT="${ANSIBLE_NO_STABLE//./}"
PYTHON_NO_DOT="${TRAVIS_PYTHON_VERSION//./}"
IMAGE_NAME="cics-python-$PYTHON_NO_DOT-ansible-$ANSIBLE_NO_DOT"
echo "$ARTIFACTORY_TOKEN" | docker login --username $ARTIFACTORY_USER --password-stdin $DOCKER_REGISTRY
docker pull $DOCKER_REGISTRY/$IMAGE_NAME:latest
bash "$TRAVIS_BUILD_DIR"/.travis/build_env.sh
docker run --rm -it -v \
$(pwd):/root/ansible_collections/ibm/ibm_zos_cics \
-e TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION \
$DOCKER_REGISTRY/$IMAGE_NAME:latest \
bash -c "cd /root/ansible_collections/ibm/ibm_zos_cics && bash .travis/build_and_test.sh"
jobs:
include:
- stage: deploy
script: bash .travis/push_artifactory.sh
python: "3.10"
env: ANSIBLE_VERSION="stable-2.14"
on:
branch: main