Open Averus89 opened 6 years ago
releaseNotesType: 'RELEASE_NOTES_PARAMETER',
releaseNotesParameter: "Automatic Jenkins Release (DEV)",
This means that Jenkins will look for a environment variable called "Automatic Jenkins Release (DEV)".
If you want to specify a static changelog through Fabric Beta Publisher then you can define an environment variable in Jenkins AUTOMATIC_RELEASE_NOTES_BODY = "Automatic Jenkins Release (DEV)"
. Then use it in the pipeline:
releaseNotesType: 'RELEASE_NOTES_PARAMETER',
releaseNotesParameter: 'AUTOMATIC_RELEASE_NOTES_BODY',
Hi,
I'm using multibranch pipeline so I can't setup an environment variable in pipeline config, so I've tried to use withEnv(['MESSAGE=xxxxxx']) and also env.MESSAGE = 'xxxxxx' unfortunately this is same result for both cases
stage('Upload to Fabric') {
withEnv(['MESSAGE=Automatic DEV Jenkins Build']){
withCredentials([string(credentialsId: 'fabric-api-key', variable: 'API_KEY'), string(credentialsId: 'fabric-build-secret', variable: 'BUILD_SECRET')]){
step([
$class: 'FabricBetaPublisher',
apiKey: API_KEY,
buildSecret: BUILD_SECRET,
releaseNotesType: 'RELEASE_NOTES_PARAMETER',
notifyTestersType: 'NOTIFY_TESTERS_GROUP',
releaseNotesParameter: 'MESSAGE',
apkPath: "app/build/outputs/apk/debugDev/*.apk",
testersGroup: TESTERS_GROUP,
organization: ORG_NAME,
useAntStyleInclude: true
])
}
}
}
Fabric Beta Publisher Plugin:
Temporary crashlytics7434298934794876914.zip got deleted = true
Setting environment variable FABRIC_BETA_BUILD_URL = https://fabric.io/Example/android/apps/com.example/beta/releases/xxxxx?build_version=33912&display_version=3.39.12-Pre-3.39.13-ba8366a
Setting environment variable FABRIC_BETA_BUILD_URL_0 = https://fabric.io/Example/android/apps/com.example/beta/releases/xxxxx?build_version=33912&display_version=3.39.12-Pre-3.39.13-ba8366a
Executing command: [java, -jar, /tmp/crashlytics-devtools8095768377736803709.jar, -androidRes, ., -apiKey, ****, -apiSecret, ****, -androidManifest, /tmp/xml6435738162507554038.tmp, -uploadDist, /mnt/jenkins/jenkins_home/workspace/app_dev-xxxxx/app/build/outputs/apk/debugDev/app-debugDev.apk, -betaDistributionNotifications, true, -betaDistributionGroupAliases, All]
Temporary xml6435738162507554038.tmp got deleted = true
Temporary crashlytics-devtools8095768377736803709.jar got deleted = true
It worked however with RUN_CHANGES_DISPLAY_URL
Fabric Beta Publisher Plugin:
Temporary crashlytics6620272965613581605.zip got deleted = true
Setting environment variable FABRIC_BETA_BUILD_URL = https://fabric.io/Example/android/apps/com.example/beta/releases/xxxxxx?build_version=33912&display_version=3.39.12-Pre-3.39.13-ba8366a
Setting environment variable FABRIC_BETA_BUILD_URL_0 = https://fabric.io/Example/android/apps/com.example/beta/releases/xxxxx?build_version=33912&display_version=3.39.12-Pre-3.39.13-ba8366a
Executing command: [java, -jar, /tmp/crashlytics-devtools8039298625099388227.jar, -androidRes, ., -apiKey, ****, -apiSecret, ****, -androidManifest, /tmp/xml633860326351190073.tmp, -uploadDist, /mnt/jenkins/jenkins_home/workspace/app-xxxxx/app/build/outputs/apk/debugDev/app-debugDev.apk, -betaDistributionNotifications, true, -betaDistributionGroupAliases, Alan, -betaDistributionReleaseNotes, http://example.com/job/app/job/dev/1/display/redirect?page=changes]
Temporary xml633860326351190073.tmp got deleted = true
Temporary crashlytics-devtools8039298625099388227.jar got deleted = true
@Averus89 does sh 'echo $MESSAGE'
print the correct message to logs?
Ah, I see now. The plugin doesn't have access to environment variables defined using withEnv
because of JENKINS-29144.
As this issue is already 3 years old, I don't think it will be closed any time soon. There should be another solution without using withEnv
.
@Averus89 is my understanding correct that you require the changelog to be the same value for all builds? Maybe we could add this to the plugin as another configuration option – provide changelog by simply passing some text.
@egor-n yeah changelog parameter would help with the mentioned case.
Hi,
I'm using 2.0 version of the plugin in Jenkins 2.121.1 and unfortunately I'm unable to send release notes via FabricBetaPublisher with Multibranch Pipeline project. Here is my fabric step configuration
Jenkins output for this step
Crashalytics email received