TMAN Ops Configuration
In the TMAN DevOps solutions, each task is executed in a separate Docker container environment. It is recommended that when the plan executes, lock the Bamboo agent. TMAN Ops for Bamboo obtains the first task working directory as a subsequent task working directory that needs to be mounted. And you can define the build version, which goes through the entire process of CI/CD.
Build Tasks
Collect Build Plan Variables
Add Collect Build Plan Variables
and Inject Bamboo variables
after Source Code Checkout
Build Version default value is repository branch name and build number ${bamboo.repositry.branch.name}-${bamboo.buildNumber}
. Sometimes the plan is triggered by a tag, and we want to define the version using the tag name ${bamboo.TagBuildTriggerReason.tagName}
env
will be used as the variable prefix. Please update Path to properties file
and Namespace
to env
and select Result
.
Create artifact, name it VERSION
and input VERSION
to the copy pattern
field.
Mend Scanner
Support Mend [WhiteSource] scanner task execute in Docker container bxwill/maven:mend
Create new stage and add a job for Mend [WhiteSource] Scanner.
We can use bxwill/maven:mend
image to run the Mend [WhiteSource] scan task. Make sure the working directory is correct to update to {bamboo.env.workdir}
, this is obtained from the Collect Build Plan
task.
Add the Mend Scanner
task type and input parameters for Mend Scan.
You can define these variables as global variables.
${bamboo.ws.wss.url}
– WhiteSource Server URL${bamboo.ws.apikey.secret}
– WhiteSource API Key${bamboo.ws.userkey.secret}
– WhiteSource User Key${bamboo.ws.product.token.secret}
– WhiteSource Product TokenAt least one of
Product Name
andProduct Token
is required
${bamboo.ws.project.token.secret}
– WhiteSource Project TokenAt least one of
Project Name
andProject Token
is required
Generate Version List
In the deployment build plan, after the deployment script check task, add Artifact download
task and Generate Version List
.
Configure Artifact download
task select one or more artifacts and define the destination path as a service name.
Generate Version List
task will generate a list file APP_VERSION
and tar all files as VERSION
. Create a artifact name it VERSION
and input VERSION
to the copy pattern
field.
Collect Deployment Variables
Add an artifact download task to download deploy scripts and service versions. But if you want to run a deploy script in the Docker task, Collect Deployment Variables
task can help pass the environment variables into the container, including the service versions.
– END –