Browse Source

修改app

bianzhenhua123 4 weeks ago
parent
commit
8dde6a8c68
2 changed files with 2 additions and 63 deletions
  1. 1 62
      poyee-app/DEV/Jenkinsfile
  2. 1 1
      poyee-app/DEV/deployment.yaml

+ 1 - 62
poyee-app/DEV/Jenkinsfile

@@ -1,64 +1,3 @@
-// node {
-//     checkout scm
-//     def rootDir = pwd()
-//     println rootDir
-//     def yaml2Map = load "./sharedLibs/yaml2Map.groovy"
-//     def stages = load "./sharedLibs/stages.k8s.groovy"
-//     def GLOBAL_CONFIG = yaml2Map.read('global.yaml').project
-
-//     jdk = tool name: 'openJDK8'
-//     env.JAVA_HOME = "${jdk}"
-    
-//     dir("AHX-app/DEV") {
-
-//         def PROJECT_CONFIG = yaml2Map.read('cfg.yaml').project
-//         def CONFIG = yaml2Map.merge(PROJECT_CONFIG, GLOBAL_CONFIG)
-//         CONFIG.docker.image = String.format(CONFIG.docker.image, CONFIG.service.name)
-//         println 'configs: ' + CONFIG
-
-//         def generateDockerfile = {->
-//             pathOfDockerfile='projdir'
-//             module = CONFIG.service.module
-//             module = module == null ? '' : (module[-1] == '/' ? module : module + '/')
-
-//             JAR = CONFIG.service.jar
-//             sh """cat > ${pathOfDockerfile}/Dockerfile<<EOF
-// #FROM openjdk:8-alpine as final
-// # RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
-// #   apk add --update --nocache ttf-dejavu fontconfig
-
-// FROM registry.cn-shanghai.aliyuncs.com/poyee/openjdk:8-slim
-// ADD skywalking-agent /app/skywalking-agent
-// ADD ${module}target/${JAR} /app/target/${JAR}
-// EOF
-// """
-//             return pathOfDockerfile
-//         }
-
-//         String[] JAVA_ARGS = ["-Djava.security.egd=file:/dev/./urandom",
-//             "-javaagent:/app/skywalking-agent/skywalking-agent.jar",
-//             "-Dskywalking.agent.service_name=${CONFIG.service.name}",
-//             "-Dskywalking.collector.backend_service=${CONFIG.skywalking.address}",
-//             "-Xmx1024m",
-//             "-Dserver.port=80",
-//             "-jar", "/app/target/${CONFIG.service.jar}",
-//             "--spring.config.location=file:/app/configs/application.yml,file:/app/configs/application-druid.yml"]
-//         String[] K8S_BACKUPS = []
-
-//         if ("upgrade" == action || "upgrade:selected" == action) {
-
-//             def base_branch = actionParameter.tokenize('/')[2]
-//             stages.upgrade(CONFIG, base_branch, K8S_BACKUPS, [
-//                 'POST_GITCLONE': { sh 'cp -r ../../skywalking-agent-9.0.0 projdir/skywalking-agent' },
-//                 'GENERATEDOCKERFILE': {generateDockerfile()},
-//                 'K3SDEPLOY' : {stages.deployWithConfigmaps(CONFIG.service, CONFIG.k3s, base_branch, JAVA_ARGS, "./configmap-env.ini", "./configmap")}
-//             ])
-//         }
-//         sh 'rm -rf projdir/skywalking-agent'
-//     }
-// }
-
-
 pipeline {
     agent any
     parameters {
@@ -118,7 +57,7 @@ EOF
                                 def base_branch = "${params.BRANCH}"
                                 stages.upgrade(CONFIG, base_branch, K8S_BACKUPS, [
                                     'GENERATEDOCKERFILE': {generateDockerfile()},
-                                    'K3SDEPLOY' : {stages.deployWithConfigmaps(CONFIG.service, CONFIG.k3s, base_branch, JAVA_ARGS, "./configmap-env.ini", "./configmap","ahxpm")}
+                                    'K3SDEPLOY' : {stages.deployWithConfigmapEnvOnly(CONFIG.service, CONFIG.k3s, base_branch, JAVA_ARGS, "./configmap-env.ini", "./configmap","ahxpm")}
                                 ])
                             }
                             sh 'rm -rf projdir/skywalking-agent'

+ 1 - 1
poyee-app/DEV/deployment.yaml

@@ -2,7 +2,7 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: <service_name><service_version>
-  namespace: default
+  namespace: ahxpm
 spec:
   strategy:
     type: RollingUpdate