Skip to content

Commit 6927309

Browse files
committed
merge compile and test job for oceanbase
1 parent 3edee68 commit 6927309

File tree

1 file changed

+6
-47
lines changed

1 file changed

+6
-47
lines changed

tools/azure-pipelines/jobs-template-for-self-hosted-agent.yml

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ parameters:
1818
jdk: # the jdk version to use
1919

2020
jobs:
21-
- job: compile_${{parameters.stage_name}}
21+
- job: compile_and_test_${{parameters.stage_name}}
2222
# succeeded() is needed to allow job cancellation
2323
condition: and(succeeded(), not(eq(variables['MODE'], 'e2e')))
2424
pool: ${{parameters.test_pool_definition}}
@@ -28,7 +28,10 @@ jobs:
2828
clean: all # this cleans the entire workspace directory before running a new job
2929
# It is necessary because the custom build machines are reused for tests.
3030
# See also https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml#workspace
31-
31+
strategy:
32+
matrix:
33+
oceanbase:
34+
module: oceanbase
3235
steps:
3336
# The cache task is persisting the .m2 directory between builds, so that
3437
# we do not have to re-download all dependencies from maven central for
@@ -51,53 +54,9 @@ jobs:
5154
echo "##vso[task.setvariable variable=PATH]$JAVA_HOME_${{parameters.jdk}}_X64/bin:$PATH"
5255
displayName: "Set JDK"
5356
# Compile
54-
- script: |
55-
./tools/ci/compile.sh || exit $?
56-
./tools/azure-pipelines/create_build_artifact.sh
57+
- script: ./tools/ci/compile.sh || exit $?
5758
displayName: Compile
5859

59-
# upload artifacts for next stage
60-
- task: PublishPipelineArtifact@1
61-
inputs:
62-
targetPath: $(FLINK_ARTIFACT_DIR)
63-
artifact: FlinkCompileArtifact-${{parameters.stage_name}}
64-
65-
- job: test_${{parameters.stage_name}}
66-
dependsOn: compile_${{parameters.stage_name}}
67-
condition: and(succeeded(), not(eq(variables['MODE'], 'e2e')))
68-
pool: ${{parameters.test_pool_definition}}
69-
timeoutInMinutes: 40
70-
cancelTimeoutInMinutes: 1
71-
workspace:
72-
clean: all
73-
strategy:
74-
matrix:
75-
oceanbase:
76-
module: oceanbase
77-
steps:
78-
# download artifact from compile stage
79-
- task: DownloadPipelineArtifact@2
80-
inputs:
81-
path: $(FLINK_ARTIFACT_DIR)
82-
artifact: FlinkCompileArtifact-${{parameters.stage_name}}
83-
84-
- script: ./tools/azure-pipelines/unpack_build_artifact.sh
85-
displayName: "Unpack Build artifact"
86-
87-
- task: Cache@2
88-
inputs:
89-
key: $(CACHE_KEY)
90-
restoreKeys: $(CACHE_FALLBACK_KEY)
91-
path: $(MAVEN_CACHE_FOLDER)
92-
continueOnError: true # continue the build even if the cache fails.
93-
condition: not(eq('${{parameters.test_pool_definition.name}}', 'Default'))
94-
displayName: Cache Maven local repo
95-
96-
- script: |
97-
echo "##vso[task.setvariable variable=JAVA_HOME]$JAVA_HOME_${{parameters.jdk}}_X64"
98-
echo "##vso[task.setvariable variable=PATH]$JAVA_HOME_${{parameters.jdk}}_X64/bin:$PATH"
99-
displayName: "Set JDK"
100-
10160
- script: sudo sysctl -w kernel.core_pattern=core.%p
10261
displayName: Set coredump pattern
10362

0 commit comments

Comments
 (0)