Ver código fonte

auto commit 2.1.19-preview8

lith 2 anos atrás
pai
commit
836234333a
28 arquivos alterados com 526 adições e 179 exclusões
  1. 2 2
      .github/workflows/action-main.yml
  2. 4 2
      Publish/DevOps2/build-bash/20.change-app-version.bash
  3. 3 1
      Publish/DevOps2/build-bash/21.change-to-next-version.bash
  4. 1 1
      Publish/DevOps2/build-bash/startup.bash
  5. 14 29
      Publish/DevOps2/jenkins-bash/06.svn-createReleaseBranch.bash
  6. 38 0
      Publish/DevOps2/jenkins-bash/07.svn-changeToNextTempVersion.bash
  7. 148 0
      Publish/DevOps2/jenkins-bash/library.develop.jenkinsfile
  8. 148 0
      Publish/DevOps2/jenkins-bash/library.preview.jenkinsfile
  9. 148 0
      Publish/DevOps2/jenkins-bash/library.production.jenkinsfile
  10. 0 125
      Publish/DevOps2/jenkins-bash/release.jenkins.pipeline
  11. 3 2
      Publish/DevOps2/release-bash/73.docker-image-build-push.sh
  12. 1 1
      Publish/DevOps2/release-bash/startup.bash
  13. 1 1
      dotnet/Gateway/App.Gateway/App.Gateway.csproj
  14. 1 1
      dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Sers.CL.Ipc.NamedPipe.csproj
  15. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj
  16. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj
  17. 1 1
      dotnet/Library/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj
  18. 1 1
      dotnet/Library/Sers/Sers.Core/Sers.Core/Sers.Core.csproj
  19. 1 1
      dotnet/Library/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj
  20. 1 1
      dotnet/Library/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj
  21. 1 1
      dotnet/Library/Sers/Sers.Serslot/Sers.Serslot/Sers.Serslot.csproj
  22. 1 1
      dotnet/Library/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj
  23. 1 1
      dotnet/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj
  24. 1 1
      dotnet/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj
  25. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Sers.Gover/Sers.Gover.csproj
  26. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter.csproj
  27. 1 1
      dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj
  28. 1 1
      dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/App.Robot.Station.csproj

+ 2 - 2
.github/workflows/action-main.yml

@@ -20,7 +20,7 @@ jobs:
   # This workflow contains a single job called "build"
   build:
     # The type of runner that the job will run on
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
 
     # Steps represent a sequence of tasks that will be executed as part of the job
     steps:
@@ -206,4 +206,4 @@ jobs:
           upload_url: ${{ steps.release_create.outputs.upload_url }}
           asset_path: ${{ env.release_dirPath }}/${{ env.appName }}-Station(netcoreapp3.1)-${{ env.release_version }}.zip
           asset_name: ${{ env.appName }}-Station-netcoreapp3.1-${{ env.release_version }}.zip
-          asset_content_type: application/zip
+          asset_content_type: application/zip

+ 4 - 2
Publish/DevOps2/build-bash/20.change-app-version.bash

@@ -8,13 +8,15 @@ set -e
 #(x.1)参数
 args_="
 
-export versionSuffix=''
+export versionSuffix='  '
 
 # "
 
+# remove spaces
+versionSuffix=${versionSuffix// /}
 
 #----------------------------------------------
-#(x.2)当前路径 
+# curPath
 curPath=$PWD
 
 cd $curPath/../../..

+ 3 - 1
Publish/DevOps2/build-bash/21.change-to-next-version.bash

@@ -8,10 +8,12 @@ set -e
 #(x.1)参数
 args_="
 
-export versionSuffix=''
+export versionSuffix='  '
 
 # "
 
+# remove spaces
+versionSuffix=${versionSuffix// /}
 
 #----------------------------------------------
 #(x.2)当前路径 

+ 1 - 1
Publish/DevOps2/build-bash/startup.bash

@@ -19,7 +19,7 @@ echo "build-bash/startup.bash"
 
 for file in *.sh
 do
-    echo "\n\n\n\n\n-----------------------------------------------------------------"
+    echo "-----------------------------------------------------------------"
     echo "[$(date "+%H:%M:%S")] sh $file"
     sh $file
 done

+ 14 - 29
Publish/DevOps2/jenkins-bash/05.svn-merge.bash → Publish/DevOps2/jenkins-bash/06.svn-createReleaseBranch.bash

@@ -1,6 +1,6 @@
 set -e
 
-# source 05.svn-merge.bash
+# source 06.svn-createReleaseBranch.bash
 
 
 #---------------------------------------------------------------------
@@ -13,66 +13,51 @@ args_="
   export      versionSuffix=.158
 # "
 
+# remove spaces
+versionSuffix=${versionSuffix// /}
 
 docker run -i --rm -v $codePath:/root/svn \
 -e codePath="$codePath" -e SVN_PATH="$SVN_PATH" -e SVN_USERNAME="$SVN_USERNAME" -e SVN_PASSWORD="$SVN_PASSWORD" -e versionSuffix="$versionSuffix" \
 docker.lith.cloud:8/dockerhub/serset/svn-client bash -c '
 set -e
 
-# (x.2) change version in csproj and commit to develop branch
-# (x.x.1) pull code from develop branch
+echo "06.svn-createReleaseBranch.bash"
+echo "06.svn-createReleaseBranch.bash  -->  #1 change version in csproj and commit to develop branch"
+echo "06.svn-createReleaseBranch.bash  -->  #1.1 pull code from develop branch"
 codePath=/root/svn/branch-develop
 mkdir -p $codePath;cd $codePath;
 svn checkout $SVN_PATH/branches/develop $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache  > /dev/null;
 
-# (x.x.2) change version in csproj
+echo "06.svn-createReleaseBranch.bash  -->  #1.2 change version in csproj"
 export versionSuffix=$versionSuffix
 cd $codePath/Publish/DevOps2/build-bash; source 20.change-app-version.bash; 
 echo "appVersion: $appVersion"
 cd $codePath;
 
-# (x.x.3) commit to develop branch
+echo "06.svn-createReleaseBranch.bash  -->  #1.3 commit to develop branch"
 svn commit $codePath -m "[tag] Sers $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
 
 
 
 
-# (x.3) merge to trunk
-# (x.x.1) pull code from trunk branch
+echo "06.svn-createReleaseBranch.bash  -->  #2 merge to trunk"
+echo "06.svn-createReleaseBranch.bash  -->  #2.1 pull code from trunk branch"
 codePath=/root/svn/branch-trunk
 mkdir -p $codePath;cd $codePath;
 svn checkout $SVN_PATH/trunk $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache > /dev/null;
 
-# (x.x.2) merge to trunk
+echo "06.svn-createReleaseBranch.bash  -->  #2.2 merge to trunk"
 svn merge $SVN_PATH/branches/develop --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
 
-# (x.x.3) commit to trunk branch
+echo "06.svn-createReleaseBranch.bash  -->  #2.3 commit to trunk branch"
 svn commit $codePath -m "[trunk] merge from develop:$appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
 
 
 
-# (x.4) create tag branch from trunk
+echo "06.svn-createReleaseBranch.bash  -->  #3 create tag branch from trunk"
 echo "appVersion: $appVersion"
-svn copy $SVN_PATH/trunk $SVN_PATH/tags/2.1/$appVersion -m "[tag] Sers $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+svn copy $SVN_PATH/trunk $SVN_PATH/tags/$appVersion -m "[tag] Sers $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
 
 
 
-
-
-# (x.5) change to next version in csproj and commit to develop branch
-# (x.x.1) pull code from develop branch
-codePath=/root/svn/branch-develop-next
-mkdir -p $codePath;cd $codePath;
-svn checkout $SVN_PATH/branches/develop $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
-
-# (x.x.2) change version in csproj
-export versionSuffix="-temp"
-cd $codePath/Publish/DevOps2/build-bash; source 21.change-to-next-version.bash; 
-echo "appVersion: $appVersion"
-cd $codePath;
-
-# (x.x.3) commit to develop branch
-svn commit $codePath -m "[develop] $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
-
-
 '

+ 38 - 0
Publish/DevOps2/jenkins-bash/07.svn-changeToNextTempVersion.bash

@@ -0,0 +1,38 @@
+set -e
+
+# source 07.svn-changeToNextTempVersion.bash
+
+
+#---------------------------------------------------------------------
+# (x.1)参数
+args_="
+  export      codePath=/root/docker-cache/jenkins/jenkins_home/workspace/Sers/develop/20/code-with-prod-version
+  export      SVN_PATH=svn://svn.ki.lith.cloud/Sers
+  export      SVN_USERNAME=jenkins
+  export      SVN_PASSWORD=**
+# "
+
+
+docker run -i --rm -v $codePath:/root/svn \
+-e codePath="$codePath" -e SVN_PATH="$SVN_PATH" -e SVN_USERNAME="$SVN_USERNAME" -e SVN_PASSWORD="$SVN_PASSWORD" \
+docker.lith.cloud:8/dockerhub/serset/svn-client bash -c '
+set -e
+
+
+echo "07.svn-changeToNextTempVersion.bash"
+echo "07.svn-changeToNextTempVersion.bash  -->  #1 pull code from develop branch"
+codePath=/root/svn/branch-develop-next
+mkdir -p $codePath;cd $codePath;
+svn checkout $SVN_PATH/branches/develop $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+echo "07.svn-changeToNextTempVersion.bash  -->  #2 change version in csproj"
+export versionSuffix="-temp"
+cd $codePath/Publish/DevOps2/build-bash; source 21.change-to-next-version.bash; 
+echo "appVersion: $appVersion"
+cd $codePath;
+
+echo "07.svn-changeToNextTempVersion.bash  -->  #3 commit to develop branch"
+svn commit $codePath -m "[develop] $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+
+'

+ 148 - 0
Publish/DevOps2/jenkins-bash/library.develop.jenkinsfile

@@ -0,0 +1,148 @@
+def remote = [:]
+remote.name = "dind-ssh"
+remote.host = "dind"
+remote.port = 22
+remote.user = "  "
+remote.password = "  "
+remote.allowAnyHosts = true
+
+pipeline {
+    agent any
+
+    environment {
+        APPNAME = "Sers"
+        stageName = "develop"
+        versionSuffix = "-${stageName}${env.build_number}"
+
+        basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/${APPNAME}/${stageName}/${env.build_number}"
+
+
+        SVN_PATH = "svn://svn.ki.lith.cloud/Sers"
+        //svn_USR = "  "
+        //svn_PSW = "  "
+        svn = credentials("svn_account")
+
+        NUGET_PATH = "/root/docker-cache/jenkins/jenkins_home/workspace/.nuget"
+
+        NUGET_SERVER = "http://nuget.lith.cloud:8"
+        //NUGET_KEY = " "
+        NUGET_KEY = credentials("nuget_key")
+
+        DOCKER_ImagePrefix = "docker-dev.lith.cloud:8/"
+        DOCKER_USERNAME = " "
+        DOCKER_PASSWORD = " "
+
+        build_crossPlatform = "no"
+        svn_createReleaseBranch = "no"
+        svn_changeToNextTempVersion = "no"
+
+        dind_ssh_account = credentials("dind_ssh_account")
+    }
+
+    stages {
+        stage('#1 deploy ?') {
+            steps {
+                timeout(time:600,unit:'SECONDS') {
+                    script {
+                        remote.user = "${dind_ssh_account_USR}"
+                        remote.password = "${dind_ssh_account_PSW}"
+
+                        env.codePath = "$basePath/build"
+
+                        env.inputChoice = "no"
+                        env.inputChoice = input message: "deploy ?", 
+                            ok: 'Proceed?', 
+                            parameters: [choice(choices:["yes","no"], description: 'if not please select no', name: 'choice')]
+                    }
+                }
+            }
+        }
+
+        stage('#2 pull code') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    echo "#1.1 pull code from svn to Path: $codePath"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$svn_USR\" --password \"$svn_PSW\" --no-auth-cache > /dev/null;  '"
+
+                    echo "#1.2 change-app-version"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/build-bash; sh 20.change-app-version.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.1 build - single platflorm') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.2 build - cross platform') {
+            when { expression { env.inputChoice == 'yes' && env.build_crossPlatform == true } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh 40.Station-publish-multiple.bash;  '"
+                }
+            }
+        }
+
+        stage('#4 publish') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER;export NUGET_KEY=$NUGET_KEY;  export DOCKER_ImagePrefix=${env.DOCKER_ImagePrefix};export DOCKER_USERNAME=${env.DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD};export DOCKER_BuildxExtArgs=\"--output=type=registry,registry.insecure=true\";    cd $codePath/Publish/DevOps2/release-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.1 code - create release branch') {
+            when { expression { env.inputChoice == 'yes' && env.svn_createReleaseBranch == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-createReleaseBranch\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";  export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/jenkins-bash; sh 06.svn-createReleaseBranch.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.2 code - next temp version') {
+            when { expression { env.inputChoice == 'yes' && env.svn_changeToNextTempVersion == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-nextTempVersion\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";   cd $codePath/Publish/DevOps2/jenkins-bash; sh 07.svn-changeToNextTempVersion.bash;  '"
+                }
+            }
+        }
+
+    }
+
+    post {
+        always {
+            timeout(time:3600,unit:'SECONDS') {
+                script {
+                    env.inputChoice = "yes"
+                    env.inputChoice = input message: "Clean temp files, \n will wait for 3600 seconds. \n click abort to skip clean.", 
+                            ok: 'Proceed', 
+                            parameters: [choice(choices:["yes","no"], name: 'choice')]
+               }
+            }
+            script {
+                if ( inputChoice == "yes" ) {
+                    echo "clean temp files"
+                    sshCommand remote: remote, command:  "rm -rf $basePath"
+                }
+            }
+        }
+        success {
+            echo "build success !"
+        }
+        failure {
+            echo "build failure !"
+        }
+        aborted {
+            echo "build aborted !"
+        }
+    }
+}

+ 148 - 0
Publish/DevOps2/jenkins-bash/library.preview.jenkinsfile

@@ -0,0 +1,148 @@
+def remote = [:]
+remote.name = "dind-ssh"
+remote.host = "dind"
+remote.port = 22
+remote.user = "  "
+remote.password = "  "
+remote.allowAnyHosts = true
+
+pipeline {
+    agent any
+
+    environment {
+        APPNAME = "Sers"
+        stageName = "preview"
+        versionSuffix = "-${stageName}${env.build_number}"
+
+        basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/${APPNAME}/${stageName}/${env.build_number}"
+
+
+        SVN_PATH = "svn://svn.ki.lith.cloud/Sers"
+        //svn_USR = "  "
+        //svn_PSW = "  "
+        svn = credentials("svn_account")
+
+        NUGET_PATH = "/root/docker-cache/jenkins/jenkins_home/workspace/.nuget"
+
+        NUGET_SERVER = "http://nuget.lith.cloud:8"
+        //NUGET_KEY = " "
+        NUGET_KEY = credentials("nuget_key")
+
+        DOCKER_ImagePrefix = "docker-dev.lith.cloud:8/"
+        DOCKER_USERNAME = " "
+        DOCKER_PASSWORD = " "
+
+        build_crossPlatform = "no"
+        svn_createReleaseBranch = "yes"
+        svn_changeToNextTempVersion = "no"
+
+        dind_ssh_account = credentials("dind_ssh_account")
+    }
+
+    stages {
+        stage('#1 deploy ?') {
+            steps {
+                timeout(time:600,unit:'SECONDS') {
+                    script {
+                        remote.user = "${dind_ssh_account_USR}"
+                        remote.password = "${dind_ssh_account_PSW}"
+
+                        env.codePath = "$basePath/build"
+
+                        env.inputChoice = "no"
+                        env.inputChoice = input message: "deploy ?", 
+                            ok: 'Proceed?', 
+                            parameters: [choice(choices:["yes","no"], description: 'if not please select no', name: 'choice')]
+                    }
+                }
+            }
+        }
+
+        stage('#2 pull code') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    echo "#1.1 pull code from svn to Path: $codePath"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$svn_USR\" --password \"$svn_PSW\" --no-auth-cache > /dev/null;  '"
+
+                    echo "#1.2 change-app-version"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/build-bash; sh 20.change-app-version.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.1 build - single platflorm') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.2 build - cross platform') {
+            when { expression { env.inputChoice == 'yes' && env.build_crossPlatform == true } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh 40.Station-publish-multiple.bash;  '"
+                }
+            }
+        }
+
+        stage('#4 publish') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER;export NUGET_KEY=$NUGET_KEY;  export DOCKER_ImagePrefix=${env.DOCKER_ImagePrefix};export DOCKER_USERNAME=${env.DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD};export DOCKER_BuildxExtArgs=\"--output=type=registry,registry.insecure=true\";    cd $codePath/Publish/DevOps2/release-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.1 code - create release branch') {
+            when { expression { env.inputChoice == 'yes' && env.svn_createReleaseBranch == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-createReleaseBranch\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";  export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/jenkins-bash; sh 06.svn-createReleaseBranch.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.2 code - next temp version') {
+            when { expression { env.inputChoice == 'yes' && env.svn_changeToNextTempVersion == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-nextTempVersion\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";   cd $codePath/Publish/DevOps2/jenkins-bash; sh 07.svn-changeToNextTempVersion.bash;  '"
+                }
+            }
+        }
+
+    }
+
+    post {
+        always {
+            timeout(time:3600,unit:'SECONDS') {
+                script {
+                    env.inputChoice = "yes"
+                    env.inputChoice = input message: "Clean temp files, \n will wait for 3600 seconds. \n click abort to skip clean.", 
+                            ok: 'Proceed', 
+                            parameters: [choice(choices:["yes","no"], name: 'choice')]
+               }
+            }
+            script {
+                if ( inputChoice == "yes" ) {
+                    echo "clean temp files"
+                    sshCommand remote: remote, command:  "rm -rf $basePath"
+                }
+            }
+        }
+        success {
+            echo "build success !"
+        }
+        failure {
+            echo "build failure !"
+        }
+        aborted {
+            echo "build aborted !"
+        }
+    }
+}

+ 148 - 0
Publish/DevOps2/jenkins-bash/library.production.jenkinsfile

@@ -0,0 +1,148 @@
+def remote = [:]
+remote.name = "dind-ssh"
+remote.host = "dind"
+remote.port = 22
+remote.user = "  "
+remote.password = "  "
+remote.allowAnyHosts = true
+
+pipeline {
+    agent any
+
+    environment {
+        APPNAME = "Sers"
+        stageName = "production"
+        versionSuffix = "  "
+
+        basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/${APPNAME}/${stageName}/${env.build_number}"
+
+
+        SVN_PATH = "svn://svn.ki.lith.cloud/Sers"
+        //svn_USR = "  "
+        //svn_PSW = "  "
+        svn = credentials("svn_account")
+
+        NUGET_PATH = "/root/docker-cache/jenkins/jenkins_home/workspace/.nuget"
+
+        NUGET_SERVER = "http://nuget.lith.cloud:8"
+        //NUGET_KEY = " "
+        NUGET_KEY = credentials("nuget_key")
+
+        DOCKER_ImagePrefix = "docker-dev.lith.cloud:8/"
+        DOCKER_USERNAME = " "
+        DOCKER_PASSWORD = " "
+
+        build_crossPlatform = "no"
+        svn_createReleaseBranch = "yes"
+        svn_changeToNextTempVersion = "yes"
+
+        dind_ssh_account = credentials("dind_ssh_account")
+    }
+
+    stages {
+        stage('#1 deploy ?') {
+            steps {
+                timeout(time:600,unit:'SECONDS') {
+                    script {
+                        remote.user = "${dind_ssh_account_USR}"
+                        remote.password = "${dind_ssh_account_PSW}"
+
+                        env.codePath = "$basePath/build"
+
+                        env.inputChoice = "no"
+                        env.inputChoice = input message: "deploy ?", 
+                            ok: 'Proceed?', 
+                            parameters: [choice(choices:["yes","no"], description: 'if not please select no', name: 'choice')]
+                    }
+                }
+            }
+        }
+
+        stage('#2 pull code') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    echo "#1.1 pull code from svn to Path: $codePath"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$svn_USR\" --password \"$svn_PSW\" --no-auth-cache > /dev/null;  '"
+
+                    echo "#1.2 change-app-version"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/build-bash; sh 20.change-app-version.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.1 build - single platflorm') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#3.2 build - cross platform') {
+            when { expression { env.inputChoice == 'yes' && env.build_crossPlatform == true } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh 40.Station-publish-multiple.bash;  '"
+                }
+            }
+        }
+
+        stage('#4 publish') {
+            when { expression { env.inputChoice == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER;export NUGET_KEY=$NUGET_KEY;  export DOCKER_ImagePrefix=${env.DOCKER_ImagePrefix};export DOCKER_USERNAME=${env.DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD};export DOCKER_BuildxExtArgs=\"--output=type=registry,registry.insecure=true\";    cd $codePath/Publish/DevOps2/release-bash; sh startup.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.1 code - create release branch') {
+            when { expression { env.inputChoice == 'yes' && env.svn_createReleaseBranch == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-createReleaseBranch\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";  export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps2/jenkins-bash; sh 06.svn-createReleaseBranch.bash;  '"
+                }
+            }
+        }
+
+        stage('#5.2 code - next temp version') {
+            when { expression { env.inputChoice == 'yes' && env.svn_changeToNextTempVersion == 'yes' } }
+            steps {
+                script {
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export codePath=\"$basePath/code-nextTempVersion\";export SVN_PATH=$SVN_PATH;export SVN_USERNAME=\"$svn_USR\";export SVN_PASSWORD=\"$svn_PSW\";   cd $codePath/Publish/DevOps2/jenkins-bash; sh 07.svn-changeToNextTempVersion.bash;  '"
+                }
+            }
+        }
+
+    }
+
+    post {
+        always {
+            timeout(time:3600,unit:'SECONDS') {
+                script {
+                    env.inputChoice = "yes"
+                    env.inputChoice = input message: "Clean temp files, \n will wait for 3600 seconds. \n click abort to skip clean.", 
+                            ok: 'Proceed', 
+                            parameters: [choice(choices:["yes","no"], name: 'choice')]
+               }
+            }
+            script {
+                if ( inputChoice == "yes" ) {
+                    echo "clean temp files"
+                    sshCommand remote: remote, command:  "rm -rf $basePath"
+                }
+            }
+        }
+        success {
+            echo "build success !"
+        }
+        failure {
+            echo "build failure !"
+        }
+        aborted {
+            echo "build aborted !"
+        }
+    }
+}

+ 0 - 125
Publish/DevOps2/jenkins-bash/release.jenkins.pipeline

@@ -1,125 +0,0 @@
-pipeline {
-    agent any
-
-    environment {
-        basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/Sers/develop/${env.build_number}"
-        APPNAME = "Sers"
-
-        SVN_PATH = "svn://svn.ki.lith.cloud/Sers"
-        SVN_USERNAME = "jenkins"
-        SVN_PASSWORD = "**"
-
-        NUGET_PATH = "/root/docker-cache/jenkins/jenkins_home/workspace/.nuget"
-
-        NUGET_SERVER = "http://nuget.lith.cloud:8"
-        NUGET_KEY = "**"
-
-        DOCKER_ImagePrefix = "docker-dev.lith.cloud:8/"
-        DOCKER_USERNAME = " "
-        DOCKER_PASSWORD = " "
-
-        DOCKER_ImagePrefix_Prd = "docker.lith.cloud:8/"
-        DOCKER_USERNAME_Prd = " "
-        DOCKER_PASSWORD_Prd = " "
-    }
-    stages {
-        stage('#1.1 develop - init code') {
-            steps {
-                script {
-                    env.codePath = "$basePath/develop"
-                }
-
-                echo "#1 build_number: ${env.build_number}"
-
-                echo "#1.1 pull code from svn to Path: $codePath"
-                sh "docker exec -i jenkins-dind sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
-
-                echo "#1.2 change-app-version"
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export versionSuffix=-preview${env.build_number};   cd $codePath/Publish/DevOps2/build-bash; sh 20.change-app-version.bash;  '"
-            } 
-        }
-
-        stage('#1.2 develop - build') {
-            steps {
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh startup.bash;  '"
-            }
-        }
-
-        stage('#1.3 develop - push') {
-            steps {
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER; export NUGET_KEY=$NUGET_KEY;  export DOCKER_ImagePrefix=${env.DOCKER_ImagePrefix};export DOCKER_USERNAME=${env.DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD};    cd $codePath/Publish/DevOps2/release-bash; sh startup.bash;  '"
-            }
-        }
-
-        stage('#2 deploy to prod?') {
-            steps {
-                timeout(time:1800,unit:'SECONDS') {
-                    script { 
-                        inputData = input message: "release to prod?", ok: 'Proceed?', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'APPROVER' 
-                    }
-                }
-            }
-        }
-
-        stage('#3.1 prd - init code') {
-            steps {
-                script {
-                    env.codePath = "$basePath/prd"
-                }
-
-                echo "#1 build_number: ${env.build_number}"
-
-                echo "#1.1 pull code from svn to Path: $codePath"
-                sh "docker exec -i jenkins-dind sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
-
-                echo "#1.2 change-app-version"
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export versionSuffix=;   cd $codePath/Publish/DevOps2/build-bash; sh 20.change-app-version.bash;  '"
-            }
-        }
-
-        stage('#3.2 prd - build') {
-            steps {
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh startup.bash;  '"
-
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps2/build-bash; sh 40.Station-publish-multiple.bash;  '"
-            }
-        }
-
-        stage('#3.3 prd - push') {
-            steps {
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER;export NUGET_KEY=$NUGET_KEY;  export DOCKER_ImagePrefix=${env.DOCKER_ImagePrefix_Prd};export DOCKER_USERNAME=${env.DOCKER_USERNAME_Prd};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD_Prd};    cd $codePath/Publish/DevOps2/release-bash; sh startup.bash;  '"
-            }
-        }
-
-        stage('#3.4 prd - publish code') {
-            steps {
-                echo "build_number: ${env.build_number}"
-
-                sh "docker exec -i jenkins-dind sh -c 'set -e; export codePath=$basePath/code-with-prod-version;export SVN_PATH=$SVN_PATH;export SVN_USERNAME=$SVN_USERNAME;export SVN_PASSWORD=$SVN_PASSWORD;  export versionSuffix=;   cd $basePath/prd/Publish/DevOps2/jenkins-bash; sh 05.svn-merge.bash;  '"
-            }
-        }
- 
-    }
-
-    post {
-        always {
-            timeout(time:3600,unit:'SECONDS') {
-                script {
-                    env.inputData = input message: "Clean temp files, \n will wait for 3600 seconds. \n click abort to skip clean.", ok: 'Proceed', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'approver'
-                    echo "input: ${env.inputData}"
-               }
-            }
-            echo "clean temp files"
-            sh "rm -rf /var/jenkins_home/workspace/Sers/develop/${env.build_number}"
-        }
-        success {
-            echo "build success !"
-        }
-        failure {
-            echo "build failure !"
-        }
-        aborted {
-            echo "build aborted !"
-        }
-    }
-}

+ 3 - 2
Publish/DevOps2/release-bash/73.docker-image-build-push.sh

@@ -12,6 +12,7 @@ export appVersion=1.0
 export DOCKER_ImagePrefix=serset/
 export DOCKER_USERNAME=serset
 export DOCKER_PASSWORD=xxx
+export DOCKER_BuildxExtArgs=
 
 # "
 
@@ -59,8 +60,8 @@ do
     if [ -f "$dockerPath/$dockerName/Dockerfile.platform" ]; then platform=`cat "$dockerPath/$dockerName/Dockerfile.platform"`; fi
 
     echo "#2.* docker build $dockerName, platform: $platform"
-    echo "docker buildx build $dockerPath/$dockerName -t ${DOCKER_ImagePrefix}$dockerName:$appVersion -t ${DOCKER_ImagePrefix}$dockerName --platform=$platform --push  --output=type=registry,registry.insecure=true --builder $builderName"
-    docker buildx build $dockerPath/$dockerName -t ${DOCKER_ImagePrefix}$dockerName:$appVersion -t ${DOCKER_ImagePrefix}$dockerName --platform=$platform --push  --output=type=registry,registry.insecure=true --builder $builderName
+    echo "docker buildx build --allow security.insecure $dockerPath/$dockerName -t ${DOCKER_ImagePrefix}$dockerName:$appVersion -t ${DOCKER_ImagePrefix}$dockerName --platform=$platform --push $DOCKER_BuildxExtArgs --builder $builderName"
+    docker buildx build --allow security.insecure $dockerPath/$dockerName -t ${DOCKER_ImagePrefix}$dockerName:$appVersion -t ${DOCKER_ImagePrefix}$dockerName --platform=$platform --push $DOCKER_BuildxExtArgs --builder $builderName
   fi
 done
 

+ 1 - 1
Publish/DevOps2/release-bash/startup.bash

@@ -45,7 +45,7 @@ echo appVersion: $appVersion
 
 for file in *.sh
 do
-    echo "\n\n\n\n\n-----------------------------------------------------------------"
+    echo "-----------------------------------------------------------------"
     echo "[$(date "+%H:%M:%S")] sh $file"
     sh $file
 done

+ 1 - 1
dotnet/Gateway/App.Gateway/App.Gateway.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>net6.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Sers.CL.Ipc.NamedPipe.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Core/Sers.Core/Sers.Core.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Serslot/Sers.Serslot/Sers.Serslot.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>net6.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>net6.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Sers.Gover/Sers.Gover.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj

@@ -8,7 +8,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>net6.0</TargetFramework>
-    <Version>2.1.19</Version>
+    <Version>2.1.19-preview8</Version>
     <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
     <Description>https://github.com/serset/Sers</Description>
   </PropertyGroup>

+ 1 - 1
dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/App.Robot.Station.csproj

@@ -9,7 +9,7 @@
 		<OutputType>Exe</OutputType>
 		<TargetFramework>net6.0</TargetFramework>
 		<RunPostBuildEvent>Always</RunPostBuildEvent>
-		<Version>2.1.19</Version>
+		<Version>2.1.19-preview8</Version>
 		<Description>https://github.com/serset/Sers</Description>
 	</PropertyGroup>