Skip to content

Commit

Permalink
Fix the CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
1996fanrui committed Apr 11, 2024
1 parent 9038c4c commit ff6c4be
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions tools/shopee_cicd/flink_autoscaler_ci.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
pipeline {
agent {
kubernetes {
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: "maven:3.8.4-openjdk-17"
imagePullPolicy: Always
command: ["cat"]
tty: true
volumeMounts: # add volumes for .m2
- mountPath: "/root/.m2"
name: "volume-0"
readOnly: false
"""
}
}
stages {
stage("Pull SourceCode") {
steps {
checkout scm
checkout(
scm: [
$class: 'GitSCM',
userRemoteConfigs: [
[
credentialsId: 'jenkins-gitlab-credential',
url: '[email protected]:shopee/data-infra/realtime-flink/flink-kubernetes-operator.git'
]
],
branches: [[name: "${params.TAG_NAME}"]],
extensions: [],
gitTool: 'git'
],
poll: false,
changelog: false
)
}
}
stage("Maven build") {
steps {
container('maven:3.8.4-openjdk-17') {
container('maven') {
sh "echo 'Start Maven BUILD'"
sh "set -o errexit"
sh "set -o nounset"
Expand All @@ -21,7 +55,7 @@ pipeline {
stage("generate jar package") {
steps {
script {
sh "echo 'Start generate the jar."
sh "echo 'Start generate the jar.'"

sh "rm -rf ./shopee-dist"
sh "mkdir ./shopee-dist"
Expand All @@ -34,7 +68,7 @@ pipeline {
stage('Upload Nexus') {
steps {
withCredentials([usernamePassword(credentialsId: "flink-nexus-secret", passwordVariable: "password", usernameVariable: "username")]) {
sh "NEXUS_SERVER=nexus-repo.data-infra.shopee.io NEXUS_USER=$username NEXUS_PASSWD=$password di-nexus-upload ./shopee-dist/flink-autoscaler-standalone.jar Flink/flink-autoscaler/${params.TAG_NAME}/flink-autoscaler-standalone.jar"
sh "NEXUS_SERVER=nexus-repo.data-infra.shopee.io NEXUS_USER=$username NEXUS_PASSWD=$password di-nexus-upload ./shopee-dist/flink-autoscaler-standalone.jar Flink/flink-autoscaler/${params.TAG_NAME}"
}
}
}
Expand Down

0 comments on commit ff6c4be

Please sign in to comment.