From 204bbfc548055b888247815ac8bde05b773e3b56 Mon Sep 17 00:00:00 2001
From: zhouyuejun <505127606@qq.com>
Date: Tue, 6 Nov 2018 10:02:56 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=88=86=E6=94=AF?=
=?UTF-8?q?=E6=98=AF=E5=90=A6=E6=AD=A3=E7=A1=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/main/main.component.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts
index d7801b6..9ef0b4b 100644
--- a/src/app/pages/main/main.component.ts
+++ b/src/app/pages/main/main.component.ts
@@ -163,7 +163,7 @@ export class MainComponent implements OnInit {
element['order'] = new Date(dateFormatter(element['linkFlight']['SODT'])).getTime() + this.TOP_9
}
}
- // else if()
+
}
}
})
From 983b379bd5e843c9eddd551922cfa87d552a1f30 Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Tue, 6 Nov 2018 14:09:43 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E5=AF=B9jenkins=E8=84=9A=E6=9C=AC=E8=BF=9B?=
=?UTF-8?q?=E8=A1=8C=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jenkins/Jenkinsfile | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 jenkins/Jenkinsfile
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
new file mode 100644
index 0000000..df54f94
--- /dev/null
+++ b/jenkins/Jenkinsfile
@@ -0,0 +1,37 @@
+node {
+ checkout scm
+ docker.image('teracyangular-cli').inside() {
+ stage('build'){
+ sh 'npm config set registry httpregistry.npm.taobao.org'
+ sh 'npm install'
+ sh 'ng build'
+ }
+ }
+
+
+ def imagesName = '130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT'
+ stage('Image Build And Push'){
+ docker.withRegistry('http130.120.3.193', 'privateDockerId') {
+ docker.build(imagesName).push()
+ }
+ }
+
+
+
+ stage('deploy'){
+ def remote = []
+ remote.name = airport-dev
+ remote.host = 130.120.3.231
+ remote.allowAnyHosts = true
+
+ withCredentials([sshUserPrivateKey(credentialsId 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable 'kfIdentity', passphraseVariable 'pVariable', usernameVariable 'userName')]) {
+ remote.user = userName
+ remote.identityFile = kfIdentity
+
+ sshCommand remote remote, command docker stop adminweb,sudo true ,failOnError false
+ sshCommand remote remote, command docker rm adminweb,sudo true ,failOnError false
+ sshCommand remote remote, command docker rmi 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true ,failOnError false
+ sshCommand remote remote, command docker run -d -p 9680 --name adminweb 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true
+ }
+ }
+}
\ No newline at end of file
From 21545ac7f4c829f8db2be4169d3f9bc099815c0d Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Tue, 6 Nov 2018 15:09:45 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jenkins/Jenkinsfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index df54f94..bbb7312 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -19,7 +19,7 @@ node {
stage('deploy'){
- def remote = []
+ def remote = [:]
remote.name = airport-dev
remote.host = 130.120.3.231
remote.allowAnyHosts = true
From 01d675eeeae171b090eae75f2cfd4b44d11c93f4 Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Tue, 6 Nov 2018 15:25:21 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6?=
=?UTF-8?q?=E6=97=B6=E5=AF=BC=E8=87=B4=E7=9A=84=E7=BC=BA=E5=B0=91=E5=AD=97?=
=?UTF-8?q?=E7=AC=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jenkins/Jenkinsfile | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index bbb7312..f4d57ba 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -1,17 +1,17 @@
node {
checkout scm
- docker.image('teracyangular-cli').inside() {
+ docker.image('teracy/angular-cli').inside() {
stage('build'){
- sh 'npm config set registry httpregistry.npm.taobao.org'
+ sh 'npm config set registry http://registry.npm.taobao.org/'
sh 'npm install'
sh 'ng build'
}
}
- def imagesName = '130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT'
+ def imagesName = '130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT'
stage('Image Build And Push'){
- docker.withRegistry('http130.120.3.193', 'privateDockerId') {
+ docker.withRegistry('http://130.120.3.193', 'privateDockerId') {
docker.build(imagesName).push()
}
}
@@ -20,18 +20,18 @@ node {
stage('deploy'){
def remote = [:]
- remote.name = airport-dev
- remote.host = 130.120.3.231
+ remote.name = "airport-dev"
+ remote.host = "130.120.3.231"
remote.allowAnyHosts = true
- withCredentials([sshUserPrivateKey(credentialsId 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable 'kfIdentity', passphraseVariable 'pVariable', usernameVariable 'userName')]) {
+ withCredentials([sshUserPrivateKey(credentialsId: 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
remote.user = userName
remote.identityFile = kfIdentity
- sshCommand remote remote, command docker stop adminweb,sudo true ,failOnError false
- sshCommand remote remote, command docker rm adminweb,sudo true ,failOnError false
- sshCommand remote remote, command docker rmi 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true ,failOnError false
- sshCommand remote remote, command docker run -d -p 9680 --name adminweb 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true
+ sshCommand remote: remote, command: "docker stop adminweb",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rm adminweb",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rmi 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker run -d -p 96:80 --name adminweb 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true
}
}
}
\ No newline at end of file
From 6a1c08b73b2ee29f5b240c5c35b066c41b6f59ab Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Tue, 6 Nov 2018 15:50:14 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85?=
=?UTF-8?q?=E5=8F=91=E5=B8=83=E8=B7=AF=E5=BE=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index c9f5a6e..c3a4385 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
FROM nginx:1.15.5-alpine
-COPY ./dist/gzzn-admin/ /usr/share/nginx/html/
+COPY ./dist/cd-airport/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
From 3c7cbd11ad564caf1fcacf6623a468cdf019f611 Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Wed, 7 Nov 2018 10:58:19 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9jenkinsfile=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jenkins/Jenkinsfile | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index f4d57ba..22d0171 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -1,4 +1,12 @@
node {
+ def mailto="601470458@qq.com,505127606@qq.com,154707516@qq.com,444949396@qq.com,714943302@qq.com" //邮件接收人员列表
+ def containerName="adminweb" //容器名称
+ def imageName="130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT" //镜像名称
+ def dockerRegistry="http://130.120.3.193"
+ def credentialsId="e41b57a4-436a-4617-817c-9e3f25a8a47f" //ssh证书id
+ def deployHost="130.120.3.231" //发布到的主机
+
+
checkout scm
docker.image('teracy/angular-cli').inside() {
stage('build'){
@@ -9,10 +17,9 @@ node {
}
- def imagesName = '130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT'
stage('Image Build And Push'){
- docker.withRegistry('http://130.120.3.193', 'privateDockerId') {
- docker.build(imagesName).push()
+ docker.withRegistry("${dockerRegistry}", 'privateDockerId') {
+ docker.build("${imageName}").push()
}
}
@@ -21,17 +28,17 @@ node {
stage('deploy'){
def remote = [:]
remote.name = "airport-dev"
- remote.host = "130.120.3.231"
+ remote.host = "${deployHost}"
remote.allowAnyHosts = true
- withCredentials([sshUserPrivateKey(credentialsId: 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
+ withCredentials([sshUserPrivateKey(credentialsId: "${credentialsId}", keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
remote.user = userName
remote.identityFile = kfIdentity
- sshCommand remote: remote, command: "docker stop adminweb",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker rm adminweb",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker rmi 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker run -d -p 96:80 --name adminweb 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true
+ sshCommand remote: remote, command: "docker stop ${containerName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rm ${containerName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rmi ${imageName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker run -d -p 96:80 --name ${containerName} ${imageName}",sudo: true
}
}
}
\ No newline at end of file
From e95dd9d4017e15e1fcda7a1acea5933c150649af Mon Sep 17 00:00:00 2001
From: zhouxiunai <154707516@qq.com>
Date: Wed, 7 Nov 2018 11:00:09 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=82=AE=E4=BB=B6?=
=?UTF-8?q?=E5=8F=91=E9=80=81=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jenkins/Jenkinsfile | 100 +++++++++++++++++++++++++++++---------------
1 file changed, 67 insertions(+), 33 deletions(-)
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index 22d0171..43efba7 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -6,39 +6,73 @@ node {
def credentialsId="e41b57a4-436a-4617-817c-9e3f25a8a47f" //ssh证书id
def deployHost="130.120.3.231" //发布到的主机
+ try
+ {
+ checkout scm
+ docker.image('teracy/angular-cli').inside() {
+ stage('build'){
+ sh 'npm config set registry http://registry.npm.taobao.org/'
+ sh 'npm install'
+ sh 'ng build'
+ }
+ }
- checkout scm
- docker.image('teracy/angular-cli').inside() {
- stage('build'){
- sh 'npm config set registry http://registry.npm.taobao.org/'
- sh 'npm install'
- sh 'ng build'
- }
+
+ stage('Image Build And Push'){
+ docker.withRegistry("${dockerRegistry}", 'privateDockerId') {
+ docker.build("${imageName}").push()
+ }
+ }
+
+
+
+ stage('deploy'){
+ def remote = [:]
+ remote.name = "airport-dev"
+ remote.host = "${deployHost}"
+ remote.allowAnyHosts = true
+
+ withCredentials([sshUserPrivateKey(credentialsId: "${credentialsId}", keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
+ remote.user = userName
+ remote.identityFile = kfIdentity
+
+ sshCommand remote: remote, command: "docker stop ${containerName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rm ${containerName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker rmi ${imageName}",sudo: true ,failOnError: false
+ sshCommand remote: remote, command: "docker run -d -p 96:80 --name ${containerName} ${imageName}",sudo: true
+ }
+ }
+
+ //发送邮件
+ emailext (
+ subject: "'${env.JOB_NAME} [${env.BUILD_NUMBER}]' 更新正常",
+ body: """
+ 详情:
+ SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'
+ 状态:${env.JOB_NAME} jenkins 更新运行正常
+ URL :${env.BUILD_URL}
+ 项目名称 :${env.JOB_NAME}
+ 项目更新进度:${env.BUILD_NUMBER}
+ """,
+ to: "${mailto}",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
}
-
-
- stage('Image Build And Push'){
- docker.withRegistry("${dockerRegistry}", 'privateDockerId') {
- docker.build("${imageName}").push()
- }
- }
-
-
-
- stage('deploy'){
- def remote = [:]
- remote.name = "airport-dev"
- remote.host = "${deployHost}"
- remote.allowAnyHosts = true
-
- withCredentials([sshUserPrivateKey(credentialsId: "${credentialsId}", keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
- remote.user = userName
- remote.identityFile = kfIdentity
-
- sshCommand remote: remote, command: "docker stop ${containerName}",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker rm ${containerName}",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker rmi ${imageName}",sudo: true ,failOnError: false
- sshCommand remote: remote, command: "docker run -d -p 96:80 --name ${containerName} ${imageName}",sudo: true
- }
- }
+ catch(e)
+ {
+ emailext (
+ subject: "'${env.JOB_NAME} [${env.BUILD_NUMBER}]' 更新失败",
+ body: """
+ 详情:
+ FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'
+ 状态:${env.JOB_NAME} jenkins 运行失败
+ URL :${env.BUILD_URL}
+ 项目名称 :${env.JOB_NAME}
+ 项目更新进度:${env.BUILD_NUMBER}
+ """,
+ to: "${mailto}",
+ recipientProviders: [[$class: 'DevelopersRecipientProvider']]
+ )
+ throw e
+ } //end catch
}
\ No newline at end of file
From 01d349af54a891b78995cdd7190648f55471f595 Mon Sep 17 00:00:00 2001
From: zhouyuejun <505127606@qq.com>
Date: Wed, 7 Nov 2018 16:32:35 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E6=8E=92=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/main/main.component.html | 28 +-
src/app/pages/main/main.component.ts | 454 ++-
src/assets/mock-data/airline-col_code.json | 10 -
src/assets/mock-data/airline-data.json | 3950 ++++++++++----------
4 files changed, 2303 insertions(+), 2139 deletions(-)
diff --git a/src/app/pages/main/main.component.html b/src/app/pages/main/main.component.html
index 9c7ae85..23f853e 100644
--- a/src/app/pages/main/main.component.html
+++ b/src/app/pages/main/main.component.html
@@ -43,24 +43,18 @@
-
diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts
index 9ef0b4b..841fbe0 100644
--- a/src/app/pages/main/main.component.ts
+++ b/src/app/pages/main/main.component.ts
@@ -18,28 +18,60 @@ export class MainComponent implements OnInit {
public airline_color: Array