-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,13 +37,6 @@ jobs: | |
username: ${{ secrets.DONGTAI_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DONGTAI_DOCKERHUB_TOKEN }} | ||
|
||
# - name: Login to AliyunRegistry | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: ${{ secrets.ALIYUN_REGISTRY }} | ||
# username: ${{ secrets.ALIYUN_DOCKERHUB_USER }} | ||
# password: ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }} | ||
|
||
- name: test and build | ||
run: | | ||
npm ci | ||
|
@@ -67,44 +60,6 @@ jobs: | |
echo "${{ github.event.repository.name }},commit_hash,${GITHUB_SHA}" >> dist/version.txt && \ | ||
cat dist/version.txt \ | ||
- uses: manyuanrong/[email protected] | ||
with: | ||
endpoint: "oss-cn-beijing.aliyuncs.com" | ||
access-key-id: ${{ secrets.OSS_KEY_ID }} | ||
access-key-secret: ${{ secrets.OSS_KEY_SECRET }} | ||
|
||
- name: Upload version file to oss | ||
run: | | ||
ossutil cp -rf dist/version.txt oss://huoqi-public/iast/release-version/${{ github.event.repository.name }}/${{ steps.release.outputs.VERSION }}/version.txt | ||
- name: Merge all version file | ||
run: | | ||
echo "DongTai,version,${{ steps.release.outputs.VERSION }}" > dist/version.txt | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-web/${{ steps.release.outputs.VERSION }}/version.txt DongTai-web.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-webapi/${{ steps.release.outputs.VERSION }}/version.txt DongTai-webapi.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-openapi/${{ steps.release.outputs.VERSION }}/version.txt DongTai-openapi.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-engine/${{ steps.release.outputs.VERSION }}/version.txt DongTai-engine.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-python/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-python.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-java/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-java.version.txt || true | ||
ossutil cp oss://huoqi-public/iast/release-version/DongTai-agent-php/${{ steps.release.outputs.VERSION }}/version.txt DongTai-agent-php.version.txt || true | ||
cat *.version.txt >> dist/version.txt | ||
cat dist/version.txt | ||
- name: Save image to tar file | ||
run: | | ||
docker save dongtai/dongtai-web:${{ steps.release.outputs.version }} | gzip > /tmp/dongtai-web-${{ steps.release.outputs.version }}.tar.gz | ||
- name: Setup Ossutil | ||
uses: manyuanrong/[email protected] | ||
with: | ||
endpoint: ${{ secrets.OSS_ENDPOINT }} | ||
access-key-id: ${{ secrets.OSS_KEY_ID }} | ||
access-key-secret: ${{ secrets.OSS_KEY_SECRET }} | ||
|
||
- name: Upload images to oss | ||
run: | | ||
ossutil cp /tmp/dongtai-web-${{ steps.release.outputs.version }}.tar.gz oss://huoqi-public/iast/server-package/${{ steps.release.outputs.version }}/ | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
|
@@ -115,15 +70,6 @@ jobs: | |
dongtai/dongtai-web:${{ steps.release.outputs.VERSION }} | ||
dongtai/dongtai-web:latest | ||
#- name: Deploy to staging | ||
# uses: wahyd4/kubectl-helm-action@master | ||
# env: | ||
# KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | ||
# with: | ||
# args: | | ||
# find deploy/deploy-eks-iast-saas-web-prod.yml -type f -exec sed -i 's/VERSION/${{ steps.release.outputs.VERSION }}/g' {} \; | ||
# ls deploy/deploy-eks-iast-saas-web-prod.yml | xargs -I {} kubectl apply -f {} | ||
|
||
- name: finish build | ||
uses: joelwmale/webhook-action@master | ||
|