gauge icon indicating copy to clipboard operation
gauge copied to clipboard

Running multi gauge commands inside a container, execute just the first gauge command

Open lirany1 opened this issue 2 years ago • 3 comments

I am running gauge inside a Kubernetes pod as a container. when i call my gauge func from a Jenkinsfile for example:

stage('Running Gauge tests') {
            options { skipDefaultCheckout() }
            steps {
                container('gauge') {
                    script {
                        if (A == '1') {
                            sleep(time: 4, unit: "MINUTES")
                            gauge("\"test1|test11|test111\"", "Gauge report1", false)
                        } else {
                            sleep(time: 4, unit: "MINUTES")
                            gauge("\"test2|test22\"", "Gauge report2", false)
                            gauge("\"test3|test33\"", "Gauge report3", false)
                            gauge("\"test4|test44\"", "Gauge report4", false)

                        }

the issue is that the statements from the else part just run the first gauge() (meaning just the test2,test22)

the gauge func is just a groovy that run the gauge command through gradle:

def call(gaugeTag, reportName = 'gaugeReport', parallel = true)
....
  catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE')
                {
                    if (parallel)
                        sh "gradle  -q -PgaugeTags=$gaugeTag -PgaugeEnv=env1 gaugeTask"
                    else
                        sh "gradle  -q -PgaugeTags=$gaugeTag -PgaugeEnv=env1 gaugeTaskNotInParallel"
                }

gauge -v Gauge version: 1.1.6 Commit Hash: 3af456f

Plugins

html-report (4.0.12) java (0.7.13) screenshot (0.0.1)

lirany1 avatar Jul 22 '22 06:07 lirany1

@lirany1 How you have configuered gauge podtemplate?

imranrazakhan avatar Sep 30 '22 14:09 imranrazakhan

I am using a Dockerfile to build the image of Gauge then i am using:

  containers:
    - name: gauge
      image: eu.gcr.io/my-ci/gauge:$gaugeVersion
      command: [cat]
      tty: true
      imagePullPolicy: Always
      volumeMounts:
        - mountPath: '/automation-tests/build/reports'
          name: workspace-volume

lirany1 avatar Oct 04 '22 13:10 lirany1

Hi bump this again do i need to set a resources limits?

lirany1 avatar Dec 11 '22 16:12 lirany1

This should now be fixed with latest version of gradle gauge plugin.

haroon-sheikh avatar Mar 16 '24 05:03 haroon-sheikh