This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.groovy
68 lines (62 loc) · 3.19 KB
/
release.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
pipeline {
agent any
stages {
stage('init') {
steps {
script {
currentBuild.displayName = sh(script: 'echo "$VERSION"', returnStdout: true).trim()
}
}
}
stage('test') {
steps {
timeout(120) {
withCredentials([usernamePassword(credentialsId: 'github-bot', passwordVariable: 'BOTTOKEN', usernameVariable: 'BOT')]) {
sh './scripts/test_components.sh $BOT $BOTTOKEN'
}
}
}
}
stage('publish-artifacts') {
steps {
build job: 'Publish-All-In-One', parameters: [string(name: 'VERSION', value: "${VERSION}")]
}
}
stage('release') {
steps {
timeout(60) {
withCredentials([usernamePassword(credentialsId: 'github-bot', passwordVariable: 'BOTTOKEN', usernameVariable: 'BOT')]) {
sh './scripts/release_components.sh $VERSION $BOT $BOTTOKEN'
}
}
}
}
// during the 'release' stage, every repo gets its version bumped, so we need to publish again, sequentially
// at this time, all components should already have their snapshot version bumped, so no need to explicitly supply the VERSION parameter
stage('publish-new-snapshot') {
steps {
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Runtime-Metamodel")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/GradlePlugins")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Connector")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/IdentityHub")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/RegistrationService")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/FederatedCatalog")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Technology-Aws")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Technology-Azure")]
build job: 'Publish-Component', parameters: [string(name: 'REPO', value: "https://github.com/eclipse-edc/Technology-Gcp")]
}
}
}
post {
always {
withCredentials([string(credentialsId: 'discord-webhook', variable: 'WEBHOOK_URL')]) {
cleanWs()
checkout scm
sh """
chmod +x scripts/discord_webhook.sh
./scripts/discord_webhook.sh "${currentBuild.getCurrentResult()}" "${env.JOB_NAME}" "${env.BUILD_NUMBER}" "https://github.com/eclipse-edc/Connector" "${VERSION}"
"""
}
}
}
}