Skip to content

Commit

Permalink
Github actions auto update oos templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ceshihao committed Nov 3, 2024
1 parent 9994d53 commit 1cdf004
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 35 deletions.
10 changes: 5 additions & 5 deletions list-templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@
"TemplateVersion": "v10",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:08Z"
"UpdatedDate": "2024-02-22T03:18:09Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -3652,7 +3652,7 @@
"TemplateVersion": "v4",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:21Z"
"UpdatedDate": "2024-02-22T03:18:22Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -5382,7 +5382,7 @@
"CreatedDate": "2024-09-02T03:38:03Z",
"Description": "{\"en\": \"Build and deploy applications on a single ECS\", \"zh-cn\": \"在单个ECS上构建并部署应用\", \"name-en\": \"ACS-ECS-LocalBuildAndDeployOnSingleECS\", \"name-zh-cn\": \"单ECS本地构建部署\"}",
"HasTrigger": false,
"Hash": "37b932e9cf04498d878fca50bd761764fb0335b325093be8b8ff8a96470e3205",
"Hash": "0a90dfd88f24e3d0e81fc89e6e97d3b2d6ab5e3fef88f4171ecfce18303fe3d9",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
Expand All @@ -5392,10 +5392,10 @@
"TemplateId": "t-19a26faf087d4d8a8a1a",
"TemplateName": "ACS-ECS-LocalBuildAndDeployOnSingleECS",
"TemplateType": "Automation",
"TemplateVersion": "v6",
"TemplateVersion": "v8",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-10-25T09:31:34Z"
"UpdatedDate": "2024-10-28T08:04:47Z"
},
{
"Category": "Other",
Expand Down
66 changes: 36 additions & 30 deletions templates/ACS-ECS-LocalBuildAndDeployOnSingleECS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,19 @@ Parameters:
en: Download Path
zh-cn: 下载路径
Description:
en: Download the code to a path on your ECS ({{ACS::ExecutionId}} in the default value is the ID of each execution, you can replace the default value as needed)
zh-cn: 将代码下载到您的ECS上的路径(默认值中{{ACS::ExecutionId}}为每次执行的ID,默认值供参考,您可按需替换)
en: The path to download the code. If not set, it will be downloaded to /root/workspace/{current execution ID}. If you need to specify a path, please ensure that the path you provide does not have files, otherwise it will fail to pull.
zh-cn: 将代码下载到您的ECS上的路径。【不填默认下载到/root/workspace/{当前执行的ID}。如您需指定路径,请确保您提供的路径下没有文件,否则会拉取失败。】
Type: String
Default: /root/workspace/{{ACS::ExecutionId}}
buildType:
Default: ''
isDockerBuild:
Label:
en: BuildType
zh-cn: 构建方式
en: IsDockerBuild
zh-cn: 是否使用Docker构建
Description:
en: If select Container Build and ECS detects that Docker is not installed, Docker will automatically be installed for you.
zh-cn: 选择容器构建,如果检测到ECS没有安装Docker,会为您自动安装Docker。
Type: String
AssociationPropertyMetadata:
ValueLabelMapping:
ContainerBuild: 容器构建
SoftwarePacakgeBuild: 软件包构建
AllowedValues:
- SoftwarePacakgeBuild
- ContainerBuild
Default: SoftwarePacakgeBuild
en: If yes, it will detect if Docker is already installed on your ECS, and if not, it will be installed automatically for you.
zh-cn: 如果选择是,会检测您的ECS上是否已安装Docker,如果没有会为您自动安装。
Type: Boolean
Default: false
buildAndDeployScript:
Label:
en: buildAndDeployScript
Expand All @@ -107,8 +100,8 @@ Parameters:
Value:
- Condition:
Fn::Equals:
- ${buildType}
- ContainerBuild
- ${isDockerBuild}
- true
Value: |-
##### Sample Java Deploy Script
##### for Docker Build
Expand All @@ -130,8 +123,8 @@ Parameters:
##### end
- Condition:
Fn::Equals:
- ${buildType}
- SoftwarePacakgeBuild
- ${isDockerBuild}
- false
Value: |-
##### Sample Java Deploy Script
##### for ECS on Alibaba Cloud Linux 3.2104
Expand Down Expand Up @@ -169,18 +162,31 @@ Tasks:
Properties:
instanceId: '{{ instanceId }}'
codeSource: git
isDockerBuild:
Fn::If:
- Fn::Equals:
- '{{ buildType }}'
- 'ContainerBuild'
- true
- false
isDockerBuild: '{{ isDockerBuild }}'
codeSourceUrl: '{{ GitCodeRepo.authorizedUrl }}'
branch: '{{ branch }}'
buildAndDeployScript: '{{ buildAndDeployScript }}'
regionId: '{{ ACS::RegionId }}'
workingDir: '{{ downloadPath }}'
workingDir:
Fn::If:
- Fn::Equals:
- '{{ downloadPath }}'
- ''
- '/root/workspace/{{ACS::ExecutionId}}'
- '{{ downloadPath }}'
Outputs:
downloadCodeFromOssCommandOutput:
Type: String
ValueSelector: downloadCodeFromOssOutput
downloadCodeFromGitCommandOutput:
Type: String
ValueSelector: downloadCodeFromGitOutput
installDockerCommandOutput:
Type: String
ValueSelector: installDockerOutput
buildAndDeployCommandOutput:
Type: String
ValueSelector: buildAndDeployOutput
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
Expand All @@ -196,7 +202,7 @@ Metadata:
zh-cn: 代码源配置
en: Code Source Configuration
- Parameters:
- buildType
- isDockerBuild
- buildAndDeployScript
Label:
default:
Expand Down

0 comments on commit 1cdf004

Please sign in to comment.