Skip to content

Commit

Permalink
fix: adding optimisation for both files
Browse files Browse the repository at this point in the history
  • Loading branch information
hhasija committed Nov 3, 2024
1 parent d6ed871 commit 7f768ab
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
9 changes: 9 additions & 0 deletions java/.ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ EOF
}
//Deploy one time so that build is copied to GCS location
stage('JDBC TO BQ'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
steps {
retry(count: stageRetryCount) {
sh '''
Expand Down
45 changes: 45 additions & 0 deletions java/.ci/UiJenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ pipeline {
}
}
stage('Parallel Execution 1'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
parallel{
stage('SPANNER TO GCS'){
steps {
Expand Down Expand Up @@ -173,6 +182,15 @@ pipeline {
}
}
stage('Parallel Execution 2'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
parallel{
stage('GCS TO GCS (csv)'){
steps {
Expand Down Expand Up @@ -266,6 +284,15 @@ pipeline {
}
}
stage('Parallel Execution 3'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
parallel{
stage('SPANNER TO GCS (csv)'){
steps {
Expand Down Expand Up @@ -337,6 +364,15 @@ pipeline {
}
}
stage('Parallel Execution 4'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
parallel{
stage('JDBC To JDBC'){
steps {
Expand Down Expand Up @@ -386,6 +422,15 @@ pipeline {
}
}
stage('Parallel Execution 5'){
when {
expression {
// Check if there are any changes in Java files in the last commit
return sh(
script: 'git diff --name-only HEAD~1 | grep -q ".java"',
returnStatus: true
) == 0
}
}
parallel{
stage('JDBC TO BQ'){
steps {
Expand Down

0 comments on commit 7f768ab

Please sign in to comment.