mirror of
https://github.com/apache/struts.git
synced 2026-08-05 14:47:09 +00:00
WW-5405 Updates to use the main branch instead of master
This commit is contained in:
@@ -13,7 +13,15 @@ notifications:
|
||||
github:
|
||||
del_branch_on_merge: true
|
||||
protected_branches:
|
||||
master:
|
||||
main:
|
||||
# contexts are the names of checks that must pass.
|
||||
contexts:
|
||||
- build
|
||||
required_pull_request_reviews:
|
||||
# it does not work because our github teams are private/secret, see INFRA-25666
|
||||
require_code_owner_reviews: false
|
||||
required_approving_review_count: 0
|
||||
release/*:
|
||||
# contexts are the names of checks that must pass.
|
||||
contexts:
|
||||
- build
|
||||
|
||||
@@ -18,8 +18,8 @@ name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
- 'main'
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -19,8 +19,8 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
- 'main'
|
||||
- 'release/*'
|
||||
|
||||
permissions: read-all
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ on:
|
||||
- cron: "30 1 * * 6" # Weekly on Saturdays
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "main"
|
||||
|
||||
permissions: read-all
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
- 'main'
|
||||
|
||||
permissions: read-all
|
||||
|
||||
@@ -45,5 +44,6 @@ jobs:
|
||||
- env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
|
||||
if: ${{ github.ref == 'master' || github.base_ref == 'master' }}
|
||||
run: ./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=master -Pcoverage -DskipAssembly
|
||||
MAIN_BRANCH: ${{ github.ref || github.base_ref || github.ref || github.base_ref }}
|
||||
if: ${{ github.ref == 'main' || github.base_ref == 'main' }}
|
||||
run: ./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=${{ envs.MAIN_BRANCH }} -Pcoverage -DskipAssembly
|
||||
|
||||
Vendored
+15
-23
@@ -39,7 +39,7 @@ pipeline {
|
||||
stages {
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh './mvnw -B -DskipAssembly verify --no-transfer-progress'
|
||||
sh './mvnw -B -DskipAssembly verify'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -64,12 +64,17 @@ pipeline {
|
||||
maven 'maven_3_latest'
|
||||
}
|
||||
environment {
|
||||
MAVEN_OPTS = "-Xmx1024m"
|
||||
MAVEN_OPTS = "-Xmx2048m"
|
||||
}
|
||||
stages {
|
||||
stage('Test & Coverage') {
|
||||
stage('Install') {
|
||||
steps {
|
||||
sh './mvnw -B verify -Pcoverage -DskipAssembly --no-transfer-progress'
|
||||
sh './mvnw -B install -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh './mvnw -B verify -Pcoverage -DskipAssembly'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
@@ -78,52 +83,39 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Code Quality') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'; branch 'release/struts-7-0-x'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
|
||||
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --no-transfer-progress'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Source & JavaDoc') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'; branch 'release/struts-7-0-x'
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir("local-snapshots-dir/") {
|
||||
deleteDir()
|
||||
}
|
||||
sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly --no-transfer-progress'
|
||||
sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
stage('Deploy Snapshot') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'; branch 'release/struts-7-0-x'
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
|
||||
sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly --no-transfer-progress'
|
||||
sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Upload nightlies') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'release/struts-7-0-x'
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh './mvnw -B package -DskipTests --no-transfer-progress'
|
||||
sh './mvnw -B package -DskipTests'
|
||||
sshPublisher(publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'Nightlies',
|
||||
|
||||
Reference in New Issue
Block a user