Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pai service config #283

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 4 additions & 36 deletions .github/workflows/iact3-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ jobs:
if: github.actor == github.event.pull_request.user.login

steps:
- name: White list
id: white-list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
white_list=($(curl -sSL -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/${{ github.repository }}/collaborators" | jq -r '.[].login'))
echo $white_list
if [[ " ${white_list[@]} " =~ " ${{ github.actor }} " ]]; then
echo "type=test" >> $GITHUB_OUTPUT
else
echo "type=validate" >> $GITHUB_OUTPUT
fi

- uses: actions/checkout@v3
id: checkout
with:
Expand All @@ -37,17 +24,6 @@ jobs:
echo "changed_files=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD master) | xargs)" >> $GITHUB_OUTPUT
echo $(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD master) | xargs)


- name: Test templates
uses: aliyun/alibabacloud-ros-tool-iact3@master
with:
templates: ${{ steps.changed-templates.outputs.changed_files }}
access_key_id: ${{ secrets.TEST_ACCOUNT_KEY }}
access_key_secret: ${{ secrets.TEST_ACCOUNT_SECRET }}
type: ${{ steps.white-list.outputs.type }}
id: test-templates
if: ${{ steps.white-list.outputs.type == 'test' }}

- name: Validate templates
uses: aliyun/alibabacloud-ros-tool-iact3@master
with:
Expand All @@ -56,24 +32,16 @@ jobs:
access_key_secret: ${{ secrets.VALIDATE_ACCOUNT_SECRET }}
type: ${{ steps.white-list.outputs.type }}
id: validate-templates
if: ${{ steps.white-list.outputs.type == 'validate' }}
if: always()

- name: DingTalk Robot
env:
TITLE: ${{ github.event.pull_request.title }}
if: always()
continue-on-error: true
run: |
if [[ "${{ steps.white-list.outputs.type }}" != "test" ]]; then
if [[ "${{ steps.validate-templates.outputs.status }}" = "success" ]]; then
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-validate CI pass. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
else
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-validate CI failed. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
fi
if [[ "${{ steps.validate-templates.outputs.status }}" = "success" ]]; then
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-validate CI pass. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
else
if [[ "${{ steps.test-templates.outputs.status }}" = "success" ]]; then
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-test CI pass. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
else
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-test CI failed. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
fi
curl -H 'Content-Type: application/json;charset=utf-8' -d '{"msgtype": "text","text": {"content": "Iact3-validate CI failed. ${{ github.event.pull_request.user.login }} PR#${{ github.event.pull_request.number }}:${TITLE} ${{ github.event.pull_request.html_url }} "}}' ${{ secrets.DINGDING_WEBHOOK }}
fi
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Resources:
name:
Fn::Sub: chatglm_demo_${RandomString.value}
instance: 1
enable_webservice: true
enable_webservice: 'true'
cloud:
computing:
instance_type:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Resources:
name:
Fn::Sub: qwen_demo_${RandomString.value}
instance: 1
enable_webservice: true
enable_webservice: 'true'
cloud:
computing:
instance_type:
Expand Down
2 changes: 1 addition & 1 deletion documents/solution/ai/pai-ai-painting-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Resources:
'Fn::Sub': 'sdwebui_${RandomString.value}'
instance: 1
type: SDCluster
enable_webservice: true
enable_webservice: 'true'
cloud:
computing:
instance_type:
Expand Down
12 changes: 6 additions & 6 deletions documents/solution/micro/build-microservices-on-ack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,16 +396,16 @@ Resources:
JsonPath: $.items.[0].status.loadBalancer.ingress.[0].hostname
FirstMatch: true
Outputs:
TeaUrl:
UrlServiceA:
Description:
zh-cn: a服务访问地址
en: The addresses of a service.
zh-cn: A服务访问地址
en: The addresses of A service.
Value:
'Fn::Sub': http://${IngressInfo}/a
CoffeeUrl:
UrlServiceB:
Description:
zh-cn: b服务访问地址
en: The addresses of b service.
zh-cn: B服务访问地址
en: The addresses of B service.
Value:
'Fn::Sub': http://${IngressInfo}/b
Metadata:
Expand Down
Loading