提交 5d63b993 作者: 余乾开

Merge branch 'master' into develop

......@@ -2,7 +2,8 @@ name: Build and Push to ACR
on:
push:
branches: [ "develop" ]
### Production
branches: [ "master" ]
env:
REGION_ID: cn-shenzhen
......@@ -25,7 +26,8 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
environment: dev
### Production
environment: prod
steps:
- name: Checkout
......@@ -50,17 +52,18 @@ jobs:
mvn clean package
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
### Production
- name: Kustomize Set Image
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
./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG
### Production
- name: Commit and Push
run: |
git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL"
git commit -am "generated Image update"
git push origin develop
\ No newline at end of file
git add .
git commit -m "Generated Image New Tag"
git push origin master
\ No newline at end of file
......@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: ims-svc
namespace: default
namespace: dev
spec:
selector:
app: ims
......@@ -10,4 +10,4 @@ spec:
ports:
- protocol: TCP
port: 10001
nodePort: 30001
\ No newline at end of file
nodePort: 30002
\ No newline at end of file
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- ../../base
namespace: prod
#namePrefix: prod-
commonLabels:
......@@ -9,4 +9,12 @@ commonLabels:
commonAnnotations:
note: This is prod!
patches:
- configMap.yaml
\ No newline at end of file
- path: configMap.yaml
- path: service-patch.yaml
target:
kind: Service
name: ims-svc
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/ims
newTag: 1f36751b7a432aa3c1a6f21bef45f5427af38788
- op: replace
path: /spec/ports/0/nodePort
value: 30001
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论