Skip to content

Commit

Permalink
Merge pull request #21 from samchesney/feature/new-jenkins-agents
Browse files Browse the repository at this point in the history
Update Jenkins Pipeline to use new agents
  • Loading branch information
samchesney authored Aug 20, 2019
2 parents d6b2a41 + 6b07a9f commit d8ac6b8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
**/.settings/*
*.pyc
**/test_results.csv
**/.venv/**

# waf build files
.lock-waf_*
Expand Down
7 changes: 7 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tap 'homebrew/core'

brew 'perl'
brew 'cpanm'

brew 'python@2'
brew 'pipenv'
32 changes: 28 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
@Library('xmos_jenkins_shared_library@master') _
@Library('xmos_jenkins_shared_library@develop') _

getApproval()

pipeline {
agent {
label 'x86&&macOS&&Apps'
label 'x86_64&&brew'
}
environment {
VIEW = 'logging'
REPO = 'lib_logging'
VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}"
}
triggers {
/* Trigger this Pipeline on changes to the repos dependencies
*
* If this Pipeline is running in a pull request, the triggers are set
* on the base branch the PR is set to merge in to.
*
* Otherwise the triggers are set on the branch of a matching name to the
* one this Pipeline is on.
*/
upstream(
upstreamProjects:
(env.JOB_NAME.contains('PR-') ?
"../tools_released/${env.CHANGE_TARGET}," +
"../tools_xmostest/${env.CHANGE_TARGET}," +
"../xdoc_released/${env.CHANGE_TARGET}"
:
"../tools_released/${env.BRANCH_NAME}," +
"../tools_xmostest/${env.BRANCH_NAME}," +
"../xdoc_released/${env.BRANCH_NAME}"),
threshold: hudson.model.Result.SUCCESS
)
}
options {
skipDefaultCheckout()
}
stages {
stage('Get view') {
steps {
prepareAppsSandbox("${VIEW}", "${REPO}")
xcorePrepareSandbox("${VIEW}", "${REPO}")
}
}
stage('Library checks') {
Expand Down
7 changes: 7 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
flake8 = "*"
2 changes: 2 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requires 'File::Copy::Recursive';
requires 'LWP::Simple'

0 comments on commit d8ac6b8

Please sign in to comment.