Skip to content

Commit

Permalink
PLANNER-2829 Remove INIT_BRANCH JobType (apache#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste authored Oct 18, 2022
1 parent 0c3b310 commit d7a6a64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (Utils.isMainBranch(this)) {
setupBuildOperatorNode()
}

// Init branch
// Setup branch branch
createSetupBranchJob()

// Nightly
Expand Down Expand Up @@ -75,7 +75,7 @@ void setupCreateIssueToolsJob() {
}

void createSetupBranchJob() {
def jobParams = KogitoJobUtils.getBasicJobParams(this, '0-setup-branch', Folder.SETUP_BRANCH, "${JENKINSFILE_PATH}/Jenkinsfile.setup-branch", 'Kogito Init Branch')
def jobParams = KogitoJobUtils.getBasicJobParams(this, '0-setup-branch', Folder.SETUP_BRANCH, "${JENKINSFILE_PATH}/Jenkinsfile.setup-branch", 'Kogito Setup Branch')
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ class Folder {
///////////////////////////////////////////////////////////////////////////////////////////
// Folder Management

/**
* @deprecated Please use SETUP_BRANCH instead
*/
@Deprecated
public static final Folder INIT_BRANCH = new Folder(
name: 'INIT_BRANCH',
jobType: JobType.INIT_BRANCH,
environment: Environment.DEFAULT,
)

public static final Folder SETUP_BRANCH = new Folder(
name: 'SETUP_BRANCH',
jobType: JobType.SETUP_BRANCH,
Expand Down Expand Up @@ -236,7 +226,6 @@ class Folder {
)

private static Set<Folder> FOLDERS = [
INIT_BRANCH,
SETUP_BRANCH,
NIGHTLY,
NIGHTLY_SONARCLOUD,
Expand Down Expand Up @@ -270,8 +259,7 @@ class Folder {
}

static List<Folder> getAllFolders(def script) {
return getAllInitBranchFolders(script) +
getAllSetupBranchFolders(script) +
return getAllSetupBranchFolders(script) +
getAllNightlyFolders(script) +
getAllPullRequestFolders(script) +
getAllReleaseFolders(script) +
Expand All @@ -283,14 +271,6 @@ class Folder {
return getAllRegistered().findAll { folder -> folder.isActive(script) }
}

/**
* @deprecated Please use getAllSetupBranchFolders instead
*/
@Deprecated
static List<Folder> getAllInitBranchFolders(def script) {
return getAllFoldersByJobTypeAndEnvironments(script, JobType.INIT_BRANCH, Environment.getActiveEnvironments(script))
}

static List<Folder> getAllSetupBranchFolders(def script) {
return getAllFoldersByJobTypeAndEnvironments(script, JobType.SETUP_BRANCH, Environment.getActiveEnvironments(script))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ import org.kie.jenkins.jobdsl.Utils
*/
class JobType {

/**
* @deprecated Please use SETUP_BRANCH instead
*/
@Deprecated
public static final JobType INIT_BRANCH = new JobType(
name: 'init-branch',
isActiveClosure: { script -> !Utils.isMainBranch(script) },
)
public static final JobType SETUP_BRANCH = new JobType(
name: 'setup-branch',
)
Expand Down Expand Up @@ -53,7 +45,6 @@ class JobType {
}

private static Set<JobType> JOB_TYPES = [
INIT_BRANCH,
SETUP_BRANCH,
NIGHTLY,
OTHER,
Expand Down

0 comments on commit d7a6a64

Please sign in to comment.