Skip to content

Commit 04b83f2

Browse files
author
zhuxiaoyang
committed
clean dependency
Signed-off-by: zhuxiaoyang <sunzhu@yunify.com>
1 parent 957c064 commit 04b83f2

2,401 files changed

Lines changed: 7 additions & 126477 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.s2i/environment

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
S2I_DESTINATION=/tmp
2-
MAVEN_ARGS_APPEND=-Dmaven.repo.local=/tmp/src/artifacts/m2 -o
3-
DISABLE_ARTIFACTS=true
1+
S2I_DESTINATION=/tmp

Jenkinsfile-online

Lines changed: 6 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,20 @@ pipeline {
3030
stage ('unit test') {
3131
steps {
3232
container ('maven') {
33-
sh 'mvn clean -o -gs `pwd`/configuration/settings.xml test'
33+
sh 'mvn clean test'
3434
}
3535
}
3636
}
3737

38-
stage('sonarqube analysis') {
39-
steps {
40-
container ('maven') {
41-
withCredentials([string(credentialsId: "$SONAR_CREDENTIAL_ID", variable: 'SONAR_TOKEN')]) {
42-
withSonarQubeEnv('sonar') {
43-
sh "mvn sonar:sonar -o -gs `pwd`/configuration/settings.xml -Dsonar.branch=$BRANCH_NAME -Dsonar.login=$SONAR_TOKEN"
44-
}
45-
}
46-
timeout(time: 1, unit: 'HOURS') {
47-
waitForQualityGate abortPipeline: true
48-
}
49-
}
50-
}
51-
}
52-
5338
stage ('build & push') {
5439
steps {
5540
container ('maven') {
56-
sh 'mvn -o -Dmaven.test.skip=true -gs `pwd`/configuration/settings.xml clean package'
57-
sh 'docker build -f Dockerfile-online -t $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER .'
41+
sh 'mvn -Dmaven.test.skip=true clean package'
42+
archiveArtifacts 'target/*.jar'
43+
sh 'docker build -f Dockerfile-online -t $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BUILD_NUMBER .'
5844
withCredentials([usernamePassword(passwordVariable : 'DOCKER_PASSWORD' ,usernameVariable : 'DOCKER_USERNAME' ,credentialsId : "$DOCKER_CREDENTIAL_ID" ,)]) {
5945
sh 'echo "$DOCKER_PASSWORD" | docker login $REGISTRY -u "$DOCKER_USERNAME" --password-stdin'
60-
sh 'docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER'
46+
sh 'docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BUILD_NUMBER'
6147
}
6248
}
6349
}
@@ -69,51 +55,10 @@ pipeline {
6955
}
7056
steps{
7157
container ('maven') {
72-
sh 'docker tag $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:latest '
58+
sh 'docker tag $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BUILD_NUMBER $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:latest '
7359
sh 'docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:latest '
7460
}
7561
}
7662
}
77-
78-
stage('deploy to dev') {
79-
when{
80-
branch 'master'
81-
}
82-
steps {
83-
input(id: 'deploy-to-dev', message: 'deploy to dev?')
84-
kubernetesDeploy(configs: 'deploy/dev-ol/**', enableConfigSubstitution: true, kubeconfigId: "$KUBECONFIG_CREDENTIAL_ID")
85-
}
86-
}
87-
stage('push with tag'){
88-
when{
89-
expression{
90-
return params.TAG_NAME =~ /v.*/
91-
}
92-
}
93-
steps {
94-
container ('maven') {
95-
input(id: 'release-image-with-tag', message: 'release image with tag?')
96-
withCredentials([usernamePassword(credentialsId: "$GITHUB_CREDENTIAL_ID", passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {
97-
sh 'git config --global user.email "kubesphere@yunify.com" '
98-
sh 'git config --global user.name "kubesphere" '
99-
sh 'git tag -a $TAG_NAME -m "$TAG_NAME" '
100-
sh 'git push http://$GIT_USERNAME:$GIT_PASSWORD@github.com/$GITHUB_ACCOUNT/devops-java-sample.git --tags --ipv4'
101-
}
102-
sh 'docker tag $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$TAG_NAME '
103-
sh 'docker push $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$TAG_NAME '
104-
}
105-
}
106-
}
107-
stage('deploy to production') {
108-
when{
109-
expression{
110-
return params.TAG_NAME =~ /v.*/
111-
}
112-
}
113-
steps {
114-
input(id: 'deploy-to-production', message: 'deploy to production?')
115-
kubernetesDeploy(configs: 'deploy/prod-ol/**', enableConfigSubstitution: true, kubeconfigId: "$KUBECONFIG_CREDENTIAL_ID")
116-
}
117-
}
11863
}
11964
}

artifacts/m2/antlr/antlr/2.7.2/_remote.repositories

Lines changed: 0 additions & 4 deletions
This file was deleted.
-350 KB
Binary file not shown.

artifacts/m2/antlr/antlr/2.7.2/antlr-2.7.2.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

artifacts/m2/antlr/antlr/2.7.2/antlr-2.7.2.pom

Lines changed: 0 additions & 6 deletions
This file was deleted.

artifacts/m2/antlr/antlr/2.7.2/antlr-2.7.2.pom.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

artifacts/m2/aopalliance/aopalliance/1.0/_remote.repositories

Lines changed: 0 additions & 4 deletions
This file was deleted.
-4.36 KB
Binary file not shown.

artifacts/m2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)