diff --git a/ci/Release.Jenkinsfile b/ci/Release.Jenkinsfile index fcf1a1f8cfd2..c70b633c14fe 100644 --- a/ci/Release.Jenkinsfile +++ b/ci/Release.Jenkinsfile @@ -12,17 +12,17 @@ pipeline { booleanParam( name: 'dryRun', defaultValue: true, - description: "builds the clients and generates release notes if requested, but doesn't modify github or upload any artifacts." + description: "Builds the clients and generates release notes if requested, but doesn't modify github or upload any artifacts" ) booleanParam( name: 'generateReleaseNotes', defaultValue: false, - description: "check if the release notes should be updated in the downstream jobs, uncheck if last runs release notes should be reused." + description: "Check if the release notes should be updated in the downstream jobs, uncheck if last runs release notes should be reused" ) persistentString( name: 'milestone', defaultValue: '', - description: 'Which github milestone to reference for generating release notes. leave empty to use version number.' + description: 'Which github milestone to reference for generating release notes. leave empty to use version number' ) booleanParam( name: "dictionaries", @@ -32,7 +32,7 @@ pipeline { booleanParam( name: 'web', defaultValue: true, - description: "Build the web app and packages (required to build the other clients if the version changed)." + description: "Build the web app and packages (required to build the other clients if the version changed)" ) booleanParam( name: 'ios', @@ -70,139 +70,137 @@ pipeline { releaseNotes = reviewReleaseNotes(web, android, desktop, ios, version) echo("${releaseNotes}") - } // script release notes + } // script } // steps } // stage prepare release notes - parallel { - stage("web app & packages") { - stages { - stage("Build") { - when { expression { return params.web } } - agent { label 'master'} - steps { - build job: 'temp-tutanota-3-webapp', parameters: [ booleanParam(name: "UPLOAD", value: !params.dryRun) ] - } // steps - } - stage("Publish") { - when { expression { return !params.dryRun && params.web } } - agent { label 'master'} - steps { - // #FIXME: create job - build job: 'tutanota-3-webapp-publish', parameters: params.generateReleaseNotes ? [ - booleanParam(name: 'DEB', value: true), - booleanParam(name: 'PUBLISH_NPM_MODULES', value: true), - booleanParam(name: 'PUBLISH_NOTES', value: true), - text(name: "releaseNotes", value: releaseNotes.web), - ] : [ - booleanParam(name: 'DEB', value: true), - booleanParam(name: 'PUBLISH_NPM_MODULES', value: true), - booleanParam(name: 'PUBLISH_NOTES', value: false), - ] - } // steps - } - } - } // stage web app & packages - stage("other clients") { - parallel { - stage("Desktop Dicts") { - when { expression { return params.dictionaries } } - steps { - script { - build job: 'tutanota-3-desktop-dictionaries', parameters: [booleanParam(name: "RELEASE", value: !params.dryRun)] - } // script - } - } - stage("Desktop Client") { - stages { - stage("Build") { - when { expression { return params.desktop } } - steps { - script { - build job: 'temp-tutanota-3-desktop', parameters: [ - booleanParam(name: "UPLOAD", value: !params.dryRun), - booleanParam(name: "WINDOWS", value: true), - booleanParam(name: "MAC", value: true), - booleanParam(name: "LINUX", value: true), - ] - } // script - } // steps - } - stage("Publish") { - when { expression { return !params.dryRun && params.desktop } } - steps { - script { - // #FIXME create job - build job: 'tutanota-3-desktop-publish', parameters: params.generateReleaseNotes ? [ - booleanParam(name: "DEB", value: true), - booleanParam(name: "PUBLISH_NOTES", value: true), - text(name: "releaseNotes", value: releaseNotes.desktop), - ] : [ - booleanParam(name: "DEB", value: true), - booleanParam(name: "PUBLISH_NOTES", value: false), - ] - } // script - } // steps - } - } - } // stage desktop client - stage("Mobile") { - stages { - stage("Build") { - stages { - parallel { - stage("iOS Client") { - when { expression { return params.ios } } - steps { - script { - build job: 'temp-tutanota-3-ios', parameters: [ - booleanParam(name: "UPLOAD", value: !params.dryRun), - booleanParam(name: "STAGING", value: true), - booleanParam(name: "PROD", value: true), - ] - } // script - } // steps - } // stage ios client - stage("Android Client") { - when { expression { return params.android } } - steps { - script { - build job: 'temp-tutanota-3-android', parameters: [ - booleanParam(name: "UPLOAD", value: !params.dryRun), - ] - } // script - } // steps - } // stage android client - } - } - } - stage("Publish") { - when { expression { return params.!dryRun && (params.ios || params.android) } } - steps { - script { - // #FIXME create job - build job: 'tutanota-3-mobile-publish', parameters: params.generateReleaseNotes ? [ - booleanParam(name: "googlePlayStore", value: params.android), - booleanParam(name: "appleAppStore", value: params.ios), - booleanParam(name: "androidGithub", value: params.android), - booleanParam(name: "iOSGithub", value: params.ios), - booleanParam(name: "iOSAppstoreReleaseNotes", value: params.ios) - text(name: "androidReleaseNotes", value: releaseNotes.android), - text(name: "iosReleaseNotes", value: releaseNotes.ios), - ] : [ - booleanParam(name: "googlePlayStore", value: params.android), - booleanParam(name: "appleAppStore", value: params.ios), - booleanParam(name: "iOSAppstoreReleaseNotes", value: false) - booleanParam(name: "androidGithub", value: false), - booleanParam(name: "iOSGithub", value: false), - ] - } // script - } // steps - } - } - } - } // parallel clients - } // stage other clients - } + stage("web app & packages") { + stages { + stage("Build") { + when { expression { return params.web } } + agent { label 'master'} + steps { + build job: 'temp-tutanota-3-webapp', parameters: [ booleanParam(name: "UPLOAD", value: !params.dryRun) ] + } // steps + } // stage build + stage("Publish") { + when { expression { return !params.dryRun && params.web } } + agent { label 'master'} + steps { + // #FIXME: create job + build job: 'tutanota-3-webapp-publish', parameters: params.generateReleaseNotes ? [ + booleanParam(name: 'DEB', value: true), + booleanParam(name: 'PUBLISH_NPM_MODULES', value: true), + booleanParam(name: 'PUBLISH_NOTES', value: true), + text(name: "releaseNotes", value: releaseNotes.web), + ] : [ + booleanParam(name: 'DEB', value: true), + booleanParam(name: 'PUBLISH_NPM_MODULES', value: true), + booleanParam(name: 'PUBLISH_NOTES', value: false), + ] + } // steps + } // stage publish + } // stages + } // stage web app & packages + stage("other clients") { + parallel { + stage("Desktop Dicts") { + when { expression { return params.dictionaries } } + steps { + script { + build job: 'tutanota-3-desktop-dictionaries', parameters: [booleanParam(name: "RELEASE", value: !params.dryRun)] + } // script + } // steps + } // stage desktop dicts + stage("Desktop Client") { + stages { + stage("Build") { + when { expression { return params.desktop } } + steps { + script { + build job: 'temp-tutanota-3-desktop', parameters: [ + booleanParam(name: "UPLOAD", value: !params.dryRun), + booleanParam(name: "WINDOWS", value: true), + booleanParam(name: "MAC", value: true), + booleanParam(name: "LINUX", value: true), + ] + } // script + } // steps + } // stage build + stage("Publish") { + when { expression { return !params.dryRun && params.desktop } } + steps { + script { + // #FIXME create job + build job: 'tutanota-3-desktop-publish', parameters: params.generateReleaseNotes ? [ + booleanParam(name: "DEB", value: true), + booleanParam(name: "PUBLISH_NOTES", value: true), + text(name: "releaseNotes", value: releaseNotes.desktop), + ] : [ + booleanParam(name: "DEB", value: true), + booleanParam(name: "PUBLISH_NOTES", value: false), + ] + } // script + } // steps + } // stage publish + } // stages + } // stage desktop client + stage("Mobile") { + stages { + stage("Build") { + stages { + stage("iOS Client") { + when { expression { return params.ios } } + steps { + script { + build job: 'temp-tutanota-3-ios', parameters: [ + booleanParam(name: "UPLOAD", value: !params.dryRun), + booleanParam(name: "STAGING", value: true), + booleanParam(name: "PROD", value: true), + ] + } // script + } // steps + } // stage ios client + stage("Android Client") { + when { expression { return params.android } } + steps { + script { + build job: 'temp-tutanota-3-android', parameters: [ + booleanParam(name: "UPLOAD", value: !params.dryRun), + ] + } // script + } // steps + } // stage android client + } // stages + } // stage build + stage("Publish") { + when { expression { return !params.dryRun && (params.ios || params.android) } } + steps { + script { + // #FIXME create job + build job: 'tutanota-3-mobile-publish', parameters: params.generateReleaseNotes ? [ + booleanParam(name: "googlePlayStore", value: params.android), + booleanParam(name: "appleAppStore", value: params.ios), + booleanParam(name: "androidGithub", value: params.android), + booleanParam(name: "iOSGithub", value: params.ios), + booleanParam(name: "iOSAppstoreReleaseNotes", value: params.ios), + text(name: "androidReleaseNotes", value: releaseNotes.android), + text(name: "iosReleaseNotes", value: releaseNotes.ios), + text(name: "appVersion", value: params.milestone) + ] : [ + booleanParam(name: "googlePlayStore", value: params.android), + booleanParam(name: "appleAppStore", value: params.ios), + text(name: "appVersion", value: params.milestone), + booleanParam(name: "iOSAppstoreReleaseNotes", value: false), + booleanParam(name: "androidGithub", value: false), + booleanParam(name: "iOSGithub", value: false), + ] + } // script + } // steps + } // stage publish + } // stages + } // stage mobile + } // parallel + } // stage other clients } // stages } // pipeline