-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
89 lines (83 loc) · 2.77 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
dist: trusty
language: java
jdk: oraclejdk8
node_js: 8
addons:
apt:
packages:
- python3.5
python: 3.5
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- gradle/wrapper/
env:
global:
- DEV_BRANCH=dev
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
install:
- npm install @openapitools/openapi-generator-cli@cli-4.3.1 yaml-cli@1.1.8 -g
- pyenv install --list
- pyenv global 3.6.3
- pip3 install --upgrade pip
- pip3 install -r requirements.txt
- pip3 install -r test-requirements.txt
- pip3 install pytest pyyaml twine wheel
before_script:
- . ./travis/travis-functions.sh
- VERSION="$(load_version_from_file)"
- log_env_variables
- pyenv --version ; pyenv versions
- python --version ; python3 --version ; python3.5 --version
- pip3 --version ; pip3 list
- bash patch.sh
script:
- log_env_variables
jobs:
include:
- stage: test
name: java
script: bash generate.sh java
- name: typescript
script: bash generate.sh typescript
- name: python
script: bash generate.sh python
- stage: alpha
name: java publish alpha
script: bash generate.sh java publish
if: branch = env(DEV_BRANCH) AND type = push
- name: typescript publish alpha
script: bash generate.sh typescript publish
if: branch = env(DEV_BRANCH) AND type = push
- name: python publish alpha
script: bash generate.sh python publish
if: branch = env(DEV_BRANCH) AND type = push
- stage: release
name: java publish release
script: bash generate.sh java release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- name: typescript publish release
script: bash generate.sh typescript release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- name: python publish release
script: bash generate.sh python release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: post release
name: tag and version upgrade
script: /bin/bash travis/travis-functions.sh post_release_version_file
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
before_install:
- |
if [ -z "${signingKeyId}" ]; then
echo "No signing the artifacts"
else
echo "Signing artifacts"
openssl aes-256-cbc -K $encrypted_bb47ec883ff6_key -iv $encrypted_bb47ec883ff6_iv -in symbol-sdk-java.gpg.enc -out symbol-sdk-java.gpg -d
fi
- pyenv versions ; python --version ; python3 --version ; python3.5 --version