Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
078fdf969e | ||
|
|
e428f7a05c | ||
|
|
d694d0f7ab | ||
|
|
2cc70877a0 | ||
|
|
44c6fab1f4 | ||
|
|
cf924d1ee7 | ||
|
|
d97d39e5c4 | ||
|
|
55f57f9085 | ||
|
|
0389942e4f | ||
|
|
bc853144b8 |
@@ -39,7 +39,9 @@ jobs:
|
|||||||
- name: Set envVar
|
- name: Set envVar
|
||||||
id: set_envar
|
id: set_envar
|
||||||
run: |
|
run: |
|
||||||
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT
|
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
|
||||||
|
echo "now workspace: ${{ github.workspace }}" &&
|
||||||
|
pwd
|
||||||
|
|
||||||
# 为其他配置文件注入环境变量
|
# 为其他配置文件注入环境变量
|
||||||
- name: Inject envVar
|
- name: Inject envVar
|
||||||
@@ -81,22 +83,13 @@ jobs:
|
|||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
|
||||||
#发布到 k8s
|
#发布到 k8s
|
||||||
- name: k8s Check and Apply New Deployment
|
- name: Generate kubeconfig and deploy
|
||||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
run: kubectl apply -f ./deployment.yml
|
||||||
with:
|
|
||||||
config: ${{ secrets.KUBE_CONFIG }}
|
|
||||||
command: apply -f ./deployment.yml
|
|
||||||
# command: apply -f http://139.9.216.111:3000/bamanker/myk3sTest/raw/branch/master/.deploy/deployment-temp.yml
|
# command: apply -f http://139.9.216.111:3000/bamanker/myk3sTest/raw/branch/master/.deploy/deployment-temp.yml
|
||||||
- name: k8s Check Pods Health
|
- name: k8s Check Pods Health
|
||||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
run: kubectl get pod -n default -l app=${{ env.APP_NAME }}
|
||||||
with:
|
|
||||||
config: ${{ secrets.KUBE_CONFIG }}
|
|
||||||
command: get pod -n default -l app=${{ env.APP_NAME }}
|
|
||||||
|
|
||||||
- name: k8s Update Deployment
|
- name: k8s Update Deployment
|
||||||
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
run: kubectl rollout restart deployment ${{ env.APP_NAME }}
|
||||||
env:
|
|
||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
|
||||||
with:
|
|
||||||
command: rollout restart deployment ${{ env.APP_NAME }}-${{ gitea.ref_name }}
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ spec:
|
|||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /actuator/health
|
path: /test
|
||||||
port: 9090
|
port: 9090
|
||||||
initialDelaySeconds: 1
|
initialDelaySeconds: 1
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
@@ -56,6 +56,6 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
port: 9090
|
port: 9090
|
||||||
nodePort: 9090
|
nodePort: 30909
|
||||||
selector:
|
selector:
|
||||||
app: $APP_NAME
|
app: $APP_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user