Skip to content

Commit

Permalink
chore: cleanup JenkinsBuild redirector
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Apr 24, 2019
1 parent 1b0d657 commit c4c14e8
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions services/jenkins/jenkins-build-redirect.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

const { redirector } = require('..')

const transformPath = ({ protocol, host, job }) =>
`/jenkins/build/${protocol}/${host}/${job}`

const commonProps = {
category: 'build',
transformPath,
dateAdded: new Date('2019-04-20'),
}

module.exports = [
redirector({
category: 'build',
route: {
base: 'jenkins-ci/s',
pattern: ':protocol(http|https)/:host+/:job+',
pattern: ':protocol(http|https)/:host/:job+',
},
transformPath: ({ protocol, host, job }) =>
`/jenkins/build/${protocol}/${host}/${job}`,
dateAdded: new Date('2019-04-20'),
...commonProps,
}),
redirector({
category: 'build',
route: {
base: 'jenkins/s',
pattern: ':protocol(http|https)/:host+/:job+',
pattern: ':protocol(http|https)/:host/:job+',
},
transformPath: ({ protocol, host, job }) =>
`/jenkins/build/${protocol}/${host}/${job}`,
dateAdded: new Date('2019-04-20'),
...commonProps,
}),
]

0 comments on commit c4c14e8

Please sign in to comment.