-
-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from SonicCloudOrg/dev
rcReady
- Loading branch information
Showing
32 changed files
with
597 additions
and
53 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
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 |
---|---|---|
|
@@ -21,12 +21,12 @@ jobs: | |
- name: git Actions | ||
uses: srt32/[email protected] | ||
- name: get agent | ||
run: git clone https://github.com/SonicCloudOrg/sonic-agent.git && cd sonic-agent && mvn package -Plinux-x86_64 && docker build -t sonicorg/sonic-agent-linux:v1.4.1-beta -f src/main/docker/Dockerfile . | ||
run: git clone https://github.com/SonicCloudOrg/sonic-agent.git && cd sonic-agent && mvn package -Plinux-x86_64 && docker build -t sonicorg/sonic-agent-linux:v1.4.1-rc -f src/main/docker/Dockerfile . | ||
- name: push | ||
run: docker push sonicorg/sonic-agent-linux:v1.4.1-beta | ||
run: docker push sonicorg/sonic-agent-linux:v1.4.1-rc | ||
- name: login docker hub | ||
run: echo "${{ secrets.ACCESS_TOKEN_ALIYUN }}" | docker login --username=小虫哔哔 registry.cn-hangzhou.aliyuncs.com --password-stdin | ||
- name: tag | ||
run: docker tag sonicorg/sonic-agent-linux:v1.4.1-beta registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.1-beta | ||
run: docker tag sonicorg/sonic-agent-linux:v1.4.1-rc registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.1-rc | ||
- name: push | ||
run: docker push registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.1-beta | ||
run: docker push registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.1-rc |
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
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
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
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
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
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
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
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
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
27 changes: 21 additions & 6 deletions
27
sonic-server-controller/src/main/java/org/cloud/sonic/controller/config/SonicRunner.java
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
71 changes: 71 additions & 0 deletions
71
...ver-controller/src/main/java/org/cloud/sonic/controller/controller/PackageController.java
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright (C) [SonicCloudOrg] Sonic Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.cloud.sonic.controller.controller; | ||
|
||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import org.cloud.sonic.common.config.WebAspect; | ||
import org.cloud.sonic.common.http.RespEnum; | ||
import org.cloud.sonic.common.http.RespModel; | ||
import org.cloud.sonic.controller.models.base.CommentPage; | ||
import org.cloud.sonic.controller.models.domain.Packages; | ||
import org.cloud.sonic.controller.models.dto.PackageDTO; | ||
import org.cloud.sonic.controller.services.PackagesService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.validation.annotation.Validated; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* @author yaming116, Eason | ||
* @des | ||
* @date 2022/5/26 1:22 | ||
*/ | ||
@Api(tags = "安装包管理") | ||
@RestController | ||
@RequestMapping("/packages") | ||
public class PackageController { | ||
|
||
@Autowired | ||
private PackagesService packagesService; | ||
|
||
@WebAspect | ||
@ApiOperation(value = "添加安装包信息", notes = "添加安装包信息") | ||
@PutMapping | ||
public RespModel<String> save(@Validated @RequestBody PackageDTO pkg) { | ||
packagesService.save(pkg.convertTo()); | ||
return new RespModel<>(RespEnum.UPDATE_OK); | ||
} | ||
|
||
@WebAspect | ||
@ApiOperation(value = "查找所有安装包", notes = "查找所有安装包") | ||
@GetMapping("/list") | ||
public RespModel<CommentPage<PackageDTO>> findAll(@RequestParam(name = "projectId") int projectId, | ||
@RequestParam(name = "branch", required = false) String branch, | ||
@RequestParam(name = "platform", required = false) String platform, | ||
@RequestParam(name = "page") int page, | ||
@RequestParam(name = "pageSize") int pageSize) { | ||
|
||
Page<Packages> pageable = new Page<>(page, pageSize); | ||
|
||
return new RespModel<>(RespEnum.SEARCH_OK, packagesService.findByProjectId(projectId, branch, platform, pageable)); | ||
} | ||
} |
Oops, something went wrong.