Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build weekly releases with Java 11 #233

Closed
wants to merge 1 commit into from
Closed

Conversation

basil
Copy link
Contributor

@basil basil commented May 18, 2022

Preparation for doing weekly releases with Java 11. This PR cannot be merged until after Jenkins core adopts Java 11 (currently scheduled for June for weekly releases). Implements Proposal A from jenkins-infra/helpdesk#2945 (comment). Additionally adds printing of the Java version being used to ease debugging.

Testing done

I did not run this actual Pipeline job, but I tested my syntax with the following simple job:

pipeline {
  agent any
  parameters {
    choice(
        choices: ['weekly', 'stable', 'stable-rc', 'security'],
        description: 'Define which Jenkins Release we are packaging for. https://github.com/jenkins-infra/release/tree/master/profile.d',
        name: 'RELEASE_PROFILE'
        )
  }

  environment {
    JAVA_VERSION = "${params.RELEASE_PROFILE == 'weekly' ? '11' : '8'}"
  }

  stages {
    stage('Build') {
      environment {
        JAVA_HOME = "/opt/jdk-${env.JAVA_VERSION}"
        PATH = "${env.JAVA_HOME}/bin:${env.PATH}"
      }
      steps {
        sh 'env | grep JAVA'
        sh 'env | grep PATH'
      }
    }
  }
}

I verified that this simple job printed the expected values for JAVA_HOME and PATH when run with both weekly and stable as the input parameters.

@basil
Copy link
Contributor Author

basil commented Jun 7, 2022

Apparently in jenkins-infra/docker-packaging#36 we decided to start building all releases with Java 11, even releases that only require Java 8.

@basil basil closed this Jun 7, 2022
@dduportal
Copy link
Contributor

Sorry @basil for missing this one :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants