Skip to content

misleading comparison of GHActions w/ Jenkins #395

Closed
@drewcoo

Description

@drewcoo

What is the current behavior?

This makes it seem like GHA supports matrices and Jenkins doesn't.

https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/migrating-from-jenkins-to-github-actions#building-with-multiple-operating-systems

What changes are you suggesting?

Jenkins has supported matrix builds in pipelines for about a year now.
https://www.jenkins.io/blog/2019/11/22/welcome-to-the-matrix/

Please update the comparison doc.

Additional information

I think this is cannonical-ish Jenkins pipeline that also matches your code sample linked above. (The indentation was like that in your code sample.)

pipeline {
agent none
stages {
  stage('Run Tests') {
    matrix {
      axes {
        axis {
          name: 'PLATFORM'
          values: 'macos', 'linux'
        }
      }
      agent { label "${PLATFORM}" }
      stages {
        stage('test') {
          tools { nodejs "node-12" }
          steps {
            dir("scripts/myapp") {
              sh(script: "npm install -g bats")
              sh(script: "bats tests")
            }
          }
        }
      }
    }
  }
}
}

Metadata

Metadata

Assignees

Labels

actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamecosystemThis issue or pull request should be reviewed by the Docs Ecosystem teamtriageDo not begin working on this issue until triaged by the team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions