提交 69dec52d 作者: 余乾开

feat(Config):生产环境配置

上级 a29e507a
...@@ -21,7 +21,8 @@ name: Build and Push to ACR ...@@ -21,7 +21,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
...@@ -46,7 +47,8 @@ permissions: ...@@ -46,7 +47,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
...@@ -80,17 +82,18 @@ jobs: ...@@ -80,17 +82,18 @@ jobs:
# 3.2 Deploy the image to the ACK cluster # 3.2 Deploy the image to the ACK cluster
- 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
### Production
- name: Commit and Push - name: Commit and Push
run: | run: |
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 commit -am "Generated Image New Tag"
git push origin develop git push origin master
#- name: Commit files #- name: Commit files
# run: | # run: |
......
...@@ -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: pms-svc
namespace: prod
spec:
selector:
app: pms
type: NodePort
ports:
- protocol: TCP
port: 35150
nodePort: 30150
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论