-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds tox templates for running tox on generic repository
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 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
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,71 @@ | ||
- job-template: | ||
id: 'library/tox' | ||
name: '{project-key}.{repo-slug}.{branch-display-name}.tox' | ||
|
||
description: | | ||
<h2> Tox tests | ||
<p> | ||
Run tox for PRs in {project-key}/{repo-slug} proposed to {branch} | ||
node: '{tox/node}' | ||
|
||
concurrent: true | ||
|
||
stash-poll-timer: '* * * * *' # !default | ||
tox/timeout: 10 # !default | ||
|
||
parameters: | ||
- library/stash-trigger/parameters | ||
|
||
wrappers: | ||
- inject-passwords: | ||
global: true | ||
mask-password-params: true | ||
- ansicolor: | ||
colormap: xterm | ||
- timeout: | ||
fail: true | ||
timeout: '{tox/timeout}' | ||
write-description: true | ||
|
||
triggers: | ||
- library/stash-trigger/trigger: | ||
project-key: '{project-key}' | ||
repo-slug: '{repo-slug}' | ||
branch: '{branch}' | ||
timer: '{stash-poll-timer}' | ||
host: '{host}' | ||
credentials-id: '{credentials-id}' | ||
username: '{username}' | ||
password: '{password}' | ||
|
||
scm: | ||
- library/stash-trigger/scm: | ||
host: '{host}' | ||
port: '{port}' | ||
username: '{username}' | ||
password: '{password}' | ||
credentials-id: '{credentials-id}' | ||
|
||
builders: | ||
- shell: | | ||
#!/bin/bash | ||
set -ex | ||
# workaround for old RHELs, we need to install correct tox system-wide | ||
rm -rf venv | ||
virtualenv venv | ||
source venv/bin/activate | ||
pip install pip --upgrade | ||
pip install tox | ||
# --- | ||
rm -rf .tox | ||
tox | ||
publishers: | ||
- library/stash-trigger/publish-feedback: | ||
host: '{host}' | ||
username: '{username}' | ||
password: '{password}' | ||
credentials-id: '{credentials-id}' |
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,20 @@ | ||
- project: | ||
name: tox-example | ||
|
||
tox/node: tox-node # example | ||
|
||
project-key: AA # example | ||
repo-slug: jjb-library # example | ||
branch-display-name: master | ||
branch: master | ||
|
||
host: git.my-bitbucket.org | ||
port: 443 | ||
credentials-id: '' | ||
username: '' | ||
password: '' | ||
|
||
tox/timeout: 10 | ||
|
||
jobs: | ||
- library/tox |