android - Jenkins: adding CUSTOM variables for a build -
jenkins create build android , uploads s3 server. build contains environment name, version number different each build. these version number, environments read pom profiles. example url of s3 http://example.com/android/staging/abc-project-v0.1.58-staging-aligned.apk
i file name
cd $workspace/target/ file_name=$(echo *aligned.apk)
so link http://example.com/dev/file_name
but visible in shell script. want use in email template software test engineers can access it. looking way in can temporarily assign value variable , put in email template.
email template is:
<html> <body> <h3>$project_name</h3> <h4>build #$build_number - $build_status</h4> <h4>${cause}</h4> <h4>$default_content</h4> <h4>git branch: ${git_branch}</h4> changes since last build: ${changes} </body> </html>
assuming email step later part of jenkins build process, you'll need use envinject plugin. own example use cases can: inject variables build step obtained file filled in previous build step.
you set these when parsing pom (either in maven directly, or parse manually build step using groovy plugin , xmlslurper (we actually)), , they'd available environment variables (e.g. $changes
, $cause
etc) email templater script later on.
Comments
Post a Comment