Skip to content

Commit e9ba079

Browse files
committed
feat: add ci
1 parent 0e10d98 commit e9ba079

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/code-check.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,21 @@ jobs:
155155
# ossutil cp -rf dongtai-agent/target/dongtai-agent.jar oss://dongtai-helm-charts/agent_test/java/dongtai-agent.jar --meta x-oss-object-acl:public-read
156156
# ossutil cp -rf dongtai-agent/src/main/resources/bin/ oss://dongtai-helm-charts/agent_test/java/ --meta x-oss-object-acl:public-read
157157
158-
# - name: Trigger Openapi Workflow
159-
# uses: benc-uk/workflow-dispatch@v1
160-
# with:
161-
# workflow: Deploy DongTai Server To Dev
162-
# token: ${{ secrets.BIDAYA0_PAT_FOR_OPENAPI }}
163-
# ref: main
164-
# repo: HXSecurity/DongTai
158+
- name: Set the value
159+
id: release
160+
run: |
161+
if [ ${{ steps.version.outputs.GITHUB_REF }} = develop ] ; then echo "helm_ns=test" >> $GITHUB_ENV
162+
elif [ ${{ steps.version.outputs.GITHUB_REF }} = beta ] ; then echo "helm_ns=beta" >> $GITHUB_ENV
163+
else echo "helm_ns=main" >> $GITHUB_ENV ;fi
164+
165+
- name: deploy to cluster
166+
uses: wahyd4/kubectl-helm-action@master
167+
env:
168+
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_TEST_DATA }}
169+
with:
170+
args: |
171+
git clone https://github.com/HXSecurity/DongTai.git
172+
helm upgrade --install huoxian --create-namespace -n iast-${{ env.helm_ns }} ./DongTai/deploy/kubernetes/helm/ \
173+
--set sca.sca_token=${{ secrets.TOKEN_SCA }} --set usb.usb_token=${{ secrets.TOKEN_SCA }} --set mysql.host=iast-mysql-test.huoxian.cn \
174+
--set tag=${{ steps.version.outputs.GITHUB_REF }}-latest --set build.agent_number=iast${{github.run_number}} --values https://charts.dongtai.io/devops.yaml
175+

0 commit comments

Comments
 (0)