Logging in to the Jazz Build Engine by using the scm login command
You can share login credentials between the Jazz® Build Engine and a build script by using the Engineering Workflow Management source control command line interface (CLI) scm login command to authenticate the Jazz Build Engine. Run the command only when you configure the build machine or change the build user password. Do not run the command in build scripts.
You installed the Engineering Workflow Management source control command line tools and the Build System Toolkit. For more information, see Source control command line reference and Installing the Build System Toolkit.
Before you begin
- Log in to the build machine as the build user.
- Create a directory that is named config to store build credentials.
- From the command line, run a command to export SCM_CONFIG_DIRECTORY as
the config directory. For example: $ export SCM_CONFIG_DIRECTORY=/var/build/config. For more information, see Source control command line interface environment variables.Note: When you run multiple Jazz Build Engines on the same logical machine, run each Jazz Build Engine as a different operating system user with a different config directory, so that the Jazz Build Engines do not overwrite each others' data. If each operating system build user has a separate home directory, unset SCM_CONFIG_DIRECTORY and use the default location of ˜/.jazz-scm/.
- Run the following command: $ scm login --repository https://repo:9443/ccm -u username –cache. The --cache option causes the password to be stored in an obfuscated form. For more information, see login.
- Enter your password when prompted. Note: (Optional) You can now use application password with OpenID Connect. For more information, see Obtaining an application password.
- After the login completes, verify that repositories.txt exists in $SCM_CONFIG_DIRECTORY. The SCM CLI ensures that the appropriate file system permissions are set, but you might want to verify that no other user on the machine can access repositories.txt.
- Configure the Jazz Build Engine to
start with -repositories $SCM_CONFIG_DIRECTORY/repositories.txt,
so that the credential file from Step 4 is used by the Jazz Build Engine.
If you do not set SCM_CONFIG_DIRECTORY because
you use the default location, specify -repositories ˜/.jazz-scm/repositories.txt.
Note: When you write build scripts, ensure that SCM_CONFIG_DIRECTORY is set properly before scm is called, either by sharing a common value among build machines or by using a script that holds machine-specific settings in a known location. If the Jazz Build Engine is running as a separate operating system user, unset SCM_CONFIG_DIRECTORY and use the default location: ˜/.jazz-scm.
You can create a scm script and use the --repository-uri switch to specify the repository to run against. The repository is the same as the repository specified in Step 4. Do not use scm login or scm logout in the script.