Skip to content

Commit 52deb21

Browse files
committed
Add simple build pipeline
1 parent af2a2f1 commit 52deb21

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# For now, the openjdk8 image gives us Ubuntu with OpenJDK 8
2+
FROM adoptopenjdk/openjdk8:latest
3+
MAINTAINER Robert Ferris <robert.ferris@codedx.com>
4+
5+
# install the atlassian SDK
6+
RUN apt-get -qq update && \
7+
apt-get -qqy install curl gnupg && \
8+
curl https://packages.atlassian.com/api/gpg/key/public | apt-key add - && \
9+
echo "deb https://packages.atlassian.com/atlassian-sdk-deb stable contrib" >>/etc/apt/sources.list && \
10+
apt-get -qq update && \
11+
apt-get -qqy install atlassian-plugin-sdk

Jenkinsfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// check out repo to $WORKSPACE/repo
2+
// we'll store the maven cache in $WORKSPACE/maven-cache
3+
4+
pipeline {
5+
agent {
6+
dockerfile true
7+
}
8+
9+
environment {
10+
ATLAS_OPTS = "-Dmaven.repo.local='$WORKSPACE/maven-cache' ${env.ATLAS_OPTS}"
11+
}
12+
13+
stages {
14+
stage('Build plugin') {
15+
steps {
16+
dir("repo/") {
17+
//TODO: if release, atlas-mvn versions:set -DnewVersion=version
18+
sh 'atlas-unit-test'
19+
sh 'atlas-package'
20+
21+
archiveArtifacts artifacts: 'target/codedx-bamboo-plugin*.jar', fingerprint: true, onlyIfSuccessful: true
22+
}
23+
}
24+
}
25+
}
26+
27+
post {
28+
always {
29+
cleanWs deleteDirs: true, patterns: [[pattern: 'maven-cache/', type: 'EXCLUDE']]
30+
}
31+
failure {
32+
slackSend botUser: true, channel: '#devchat', color: 'danger', message: "Bamboo Plugin build FAILED (<${env.BUILD_URL}|Open>)"
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)