• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • dimensionsscm-plugin
    • None

      We are trying to pipeline a series of deployment chains using the dimensionscm plugin that are already in place and fully functional
      but configured by user interface.

      the process involves

      downloading the source code from git
      compilation if necessary
      uploading files to serena
      operating the files (at the moment this is done by calling serena jars directly)
      creation of the baseline.

      we tried to put the first instruction "dimensionsscm" and it already gives us a null pointer in the finddifference.

      anyway we wouldn't know how to proceed

      All help would be appreciated

          [JENKINS-67954] Deployment Method

          The pipeline support provides the triggering of jobs and enumerating and downloading of source code - i.e. the SCM plugin functionality. See https://www.jenkins.io/doc/pipeline/steps/dimensionsscm/ - only the SCM plugin part of the main Jenkins Dimensions Plugin is available in pipelines.

          The other functionality you can use with the plugin in freestyle jobs (i.e. the steps) is easily accessible using a `sh` step that calls the dmcli command line (e.g. locking and unlocking projects, creating baselines, invoking Dimensions Build, storing artifacts into DCM, etc.). In fact, this is the recommended way to do these operations - you can still use the Jenkins credentials plugin to keep the username and password secure, and by using dmcli commands, any Dimensions CM functionality at all is available to you.

          David Conneely added a comment - The pipeline support provides the triggering of jobs and enumerating and downloading of source code - i.e. the SCM plugin functionality. See https://www.jenkins.io/doc/pipeline/steps/dimensionsscm/ - only the SCM plugin part of the main Jenkins Dimensions Plugin is available in pipelines. The other functionality you can use with the plugin in freestyle jobs (i.e. the steps) is easily accessible using a `sh` step that calls the dmcli command line (e.g. locking and unlocking projects, creating baselines, invoking Dimensions Build, storing artifacts into DCM, etc.). In fact, this is the recommended way to do these operations - you can still use the Jenkins credentials plugin to keep the username and password secure, and by using dmcli commands, any Dimensions CM functionality at all is available to you.

          I will add an example of a pipeline that uses the SCM plugin for the SCM part, and uses a couple of `sh` steps to run dmcli commands.

          David Conneely added a comment - I will add an example of a pipeline that uses the SCM plugin for the SCM part, and uses a couple of `sh` steps to run dmcli commands.

          Here is an example of a trivial script syntax pipeline that uses the Jenkins Dimensions Plugin. To generate the 'dimensionsscm' line, I used the snippet generator in Jenkins (click the 'Pipeline Syntax' link to open it) and selected 'dimensionsscm: Dimensions' as the step to generate syntax for. I then filled in the form as if it were a freestyle job (including checking the connection to the Dimensions server) and copied the resulting snippet into a pipeline. I used the Legacy username/password credentials type in this example: on a production system, I'd recommend using the Credentials credentials type (to use credentials from the Credentials plugin).

              node {
                  dimensionsscm canJobDelete: true, canJobUpdate: true, credentialsType: 'userDefined', eol: 'DEFAULT', folders: [[value: '/']],`
                          password: '****will be encrypted****', permissions: 'DEFAULT', project: 'ANDRII:JENK1', userDatabase: 'cm_typical@dim14',
                          userName: 'dmsys', userServer: 'stl-qa-vcsl15-2'
                  stage('Build') {
                      bat 'echo Hellow World'
                  }
              }
          

          David Conneely added a comment - Here is an example of a trivial script syntax pipeline that uses the Jenkins Dimensions Plugin. To generate the 'dimensionsscm' line, I used the snippet generator in Jenkins (click the 'Pipeline Syntax' link to open it) and selected 'dimensionsscm: Dimensions' as the step to generate syntax for. I then filled in the form as if it were a freestyle job (including checking the connection to the Dimensions server) and copied the resulting snippet into a pipeline. I used the Legacy username/password credentials type in this example: on a production system, I'd recommend using the Credentials credentials type (to use credentials from the Credentials plugin). node { dimensionsscm canJobDelete: true, canJobUpdate: true, credentialsType: 'userDefined', eol: 'DEFAULT', folders: [[value: '/']],` password: '****will be encrypted****', permissions: 'DEFAULT', project: 'ANDRII:JENK1', userDatabase: 'cm_typical@dim14', userName: 'dmsys', userServer: 'stl-qa-vcsl15-2' stage('Build') { bat 'echo Hellow World' } }

          You can then use either the `bat` or `sh` steps (depending if Windows or Linux) to run the `dmcli` command line.

          bat 'dmcli -user dmsys -pass ****password**** -dbname cm_typical -dsn dim14 -host stl-qa-vcsl15-2 SCWS'

          will run the `SCWS` command, for example. You can use the Jenkins Credential Plugin to put the password into an environment variable, so you can use `-pass %PASSWORD%` or similar.

          David Conneely added a comment - You can then use either the `bat` or `sh` steps (depending if Windows or Linux) to run the `dmcli` command line. bat 'dmcli -user dmsys -pass ****password**** -dbname cm_typical -dsn dim14 -host stl-qa-vcsl15-2 SCWS' will run the `SCWS` command, for example. You can use the Jenkins Credential Plugin to put the password into an environment variable, so you can use `-pass %PASSWORD%` or similar.

            Unassigned Unassigned
            plato00 Daniele Botti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: