提交 b116c19b 作者: xiaowang

Merge branch 'master' of http://git.mmcuav.cn/iuav/ims into develop

# Conflicts:
#	kustomization/overlays/dev/kustomization.yaml
...@@ -2,7 +2,8 @@ name: Build and Push to ACR ...@@ -2,7 +2,8 @@ name: Build and Push to ACR
on: on:
push: push:
branches: [ "develop" ] ### Production
branches: [ "master" ]
env: env:
REGION_ID: cn-shenzhen REGION_ID: cn-shenzhen
...@@ -17,7 +18,8 @@ env: ...@@ -17,7 +18,8 @@ env:
ACR_EE_IMAGE: ims ACR_EE_IMAGE: ims
ACR_EE_TAG: ${{ github.sha }} ACR_EE_TAG: ${{ github.sha }}
JAVA_VERSION: '8' JAVA_VERSION: '8'
GITLAB_URL: https://oauth2:MjVJKxB7m4tCy7symBzn@git.mmcuav.cn/iuav/ims.git ### Kustomize
GITLAB_URL: https://oauth2:MjVJKxB7m4tCy7symBzn@git.mmcuav.cn/kustomize/iuav-ims.git
permissions: permissions:
contents: read contents: read
...@@ -25,7 +27,8 @@ permissions: ...@@ -25,7 +27,8 @@ permissions:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: dev ### Production
environment: prod
steps: steps:
- name: Checkout - name: Checkout
...@@ -53,7 +56,7 @@ jobs: ...@@ -53,7 +56,7 @@ jobs:
- name: Kustomize Set Image - name: Kustomize Set Image
run: |- run: |-
cd kustomization/overlays/dev cd kustomization/overlays/prod
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6 curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6
./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG ./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG
...@@ -62,5 +65,6 @@ jobs: ...@@ -62,5 +65,6 @@ jobs:
git config user.name "Chuck" git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com" git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL" git remote set-url origin "$GITLAB_URL"
git commit -am "generated Image update" git add .
git push origin develop git commit -m "Generated Image New Tag"
\ No newline at end of file git push origin master
\ No newline at end of file
...@@ -7,3 +7,4 @@ target ...@@ -7,3 +7,4 @@ target
.idea .idea
*.iml *.iml
*/application.yml */application.yml
.github/
...@@ -2,7 +2,7 @@ apiVersion: v1 ...@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: ims-svc name: ims-svc
namespace: default namespace: dev
spec: spec:
selector: selector:
app: ims app: ims
...@@ -10,4 +10,4 @@ spec: ...@@ -10,4 +10,4 @@ spec:
ports: ports:
- protocol: TCP - protocol: TCP
port: 10001 port: 10001
nodePort: 30001 nodePort: 30002
\ No newline at end of file \ No newline at end of file
...@@ -9,4 +9,5 @@ commonLabels: ...@@ -9,4 +9,5 @@ commonLabels:
commonAnnotations: commonAnnotations:
note: This is prod! note: This is prod!
patches: patches:
- configMap.yaml - path: configMap.yaml
\ No newline at end of file - path: service.yaml
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: ims-svc
namespace: prod
spec:
selector:
app: ims
type: NodePort
ports:
- protocol: TCP
port: 10001
nodePort: 30001
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论