Commit fd9597b5 authored by Yuri Blankenstein's avatar Yuri Blankenstein
Browse files

Merge branch '9-configure-deployment-to-eclipse-foundation-infrastructure' into 'develop'

Resolve "Configure deployment to Eclipse Foundation infrastructure"

Closes #9

See merge request !9
parents 47de5a97 92bb605e
Pipeline #2522 passed with stage
in 0 seconds
...@@ -68,9 +68,9 @@ pipeline { ...@@ -68,9 +68,9 @@ pipeline {
BUILD_ARGS="-Pjenkins" BUILD_ARGS="-Pjenkins"
# Configure 'sign' profile for build. # Configure 'sign' profile for build.
# Sign 'master' branch, to allow checking release signing before deployment. # Sign 'develop' branch, to allow release signing for 'nightly' deployment.
# Sign releases. Determined based on release version tag name. # Sign releases. Determined based on branch or release version tag name.
if [[ "$GIT_BRANCH" == "master" || "$TAG_NAME" =~ ^v[0-9]+\\.[0-9]+.*$ ]]; then if [[ "$GIT_BRANCH" == "develop" || "$TAG_NAME" =~ ^v[0-9]+\\.[0-9]+.*$ ]]; then
BUILD_ARGS="$BUILD_ARGS -Psign" BUILD_ARGS="$BUILD_ARGS -Psign"
fi fi
...@@ -103,6 +103,42 @@ pipeline { ...@@ -103,6 +103,42 @@ pipeline {
} }
} }
} }
stage('Deploy') {
when {
anyOf {
branch 'develop'
tag pattern: "v\\d+\\.\\d+.*", comparator: "REGEXP"
}
}
environment {
DOWNLOADS_PATH = "/home/data/httpd/download.eclipse.org/trace4cps"
DOWNLOADS_URL = "genie.trace4cps@projects-storage.eclipse.org:${DOWNLOADS_PATH}"
WEBSITE_GIT_URL = "ssh://genie.trace4cps@git.eclipse.org:29418/www.eclipse.org/trace4cps.git"
RELEASE_VERSION = getReleaseVersionFromTag(env.TAG_NAME)
}
steps {
// Deploy downloads.
sh '''
mkdir -p deploy/update-site/
unzip -q releng/org.eclipse.trace4cps.repository/target/*-updatesite.zip -d deploy/update-site/
'''
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
// Remove any existing directory for this release.
sh 'ssh genie.trace4cps@projects-storage.eclipse.org rm -rf ${DOWNLOADS_PATH}/${RELEASE_VERSION}/'
// Create directory for this release.
sh 'ssh genie.trace4cps@projects-storage.eclipse.org mkdir -p ${DOWNLOADS_PATH}/${RELEASE_VERSION}/'
// Update site (archive).
sh 'scp -r releng/org.eclipse.trace4cps.repository/target/*-updatesite.zip ${DOWNLOADS_URL}/${RELEASE_VERSION}/'
// Update site (extracted).
sh 'ssh genie.trace4cps@projects-storage.eclipse.org mkdir -p ${DOWNLOADS_PATH}/${RELEASE_VERSION}/update-site/'
sh 'scp -r deploy/update-site/* ${DOWNLOADS_URL}/${RELEASE_VERSION}/update-site/'
}
}
}
} }
post { post {
...@@ -121,3 +157,11 @@ pipeline { ...@@ -121,3 +157,11 @@ pipeline {
} }
} }
} }
def getReleaseVersionFromTag(tag) {
if (tag == null) {
return 'nightly'
} else {
return tag
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment