中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

怎么做網(wǎng)站掙錢百度seo關(guān)鍵詞優(yōu)化電話

怎么做網(wǎng)站掙錢,百度seo關(guān)鍵詞優(yōu)化電話,成都 企業(yè) 網(wǎng)站制作,公司形象墻設(shè)計(jì)效果圖使用Jenkins CLI進(jìn)行二次開發(fā) 使用背景 公司自研CI/DI平臺(tái),借助JenkinsSonarQube進(jìn)行代碼質(zhì)量管理。對接版本 Jenkins版本為:Version 2.428 SonarQube版本為:Community EditionVersion 10.2.1 (build 78527)技術(shù)選型 Java對接Jenkins有第…

使用Jenkins CLI進(jìn)行二次開發(fā)

使用背景

公司自研CI/DI平臺(tái),借助Jenkins+SonarQube進(jìn)行代碼質(zhì)量管理。

對接版本

Jenkins版本為:Version 2.428
SonarQube版本為:Community EditionVersion 10.2.1 (build 78527)

技術(shù)選型

Java對接Jenkins有第三方組件,比如jenkins-rest、jenkins-client,但是考慮到第三方組件會(huì)引入其他jar包,而且會(huì)存在漏洞問題。
到時(shí)候升級組件時(shí)可能會(huì)和項(xiàng)目框架本身使用的第三方j(luò)ar起沖突。因此,使用jenkins-cli來實(shí)現(xiàn)自己的需求。注意:這里不是單純的使用java -jar jenkins-cli.jar -http xxxx來實(shí)現(xiàn)接口調(diào)用,
而且提取并修改jenkins-cli.jar中的源碼來達(dá)到自身需求開發(fā)的目的。
比如創(chuàng)建View時(shí),使用jenkins-cli.jar時(shí)需要傳入xml內(nèi)容(標(biāo)準(zhǔn)輸入流),
所以我們進(jìn)行了改造,可以支持傳入byte數(shù)組的形式,使用體驗(yàn)更符合大眾。

jenkins-cli.jar的源碼修改

在這里插入圖片描述

package com.infosec.autobuild.util;import com.cdancy.jenkins.rest.JenkinsClient;
import com.cdancy.jenkins.rest.domain.job.BuildInfo;
import com.cdancy.jenkins.rest.domain.queue.QueueItem;
import com.infosec.autobuild.dto.*;
import com.infosec.autobuild.dto.jenkins.BuildInfoDto;
import com.infosec.autobuild.dto.jenkins.CredentialDto;
import com.infosec.autobuild.dto.jenkins.JobDto;
import com.infosec.autobuild.dto.jenkins.ViewDto;
import com.infosec.autobuild.hudson.cli.CLI;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.AuthCache;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.BasicAuthCache;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;/*** Jenkins cli工具類*/
@Slf4j
public class JenkinsUtil {private static final String PROTOCOL_HTTP = "-http";private static final String PROTOCOL_WEB_SOCKET = "-webSocket";/*** 結(jié)束符:\r\n*/private static final String END_SYMBOL = "\\r\\n";/*** 換行符:\n*/private static final String LINE_BREAK_SYMBOL = "\\n";/*** Jenkins 憑證相關(guān)操作(暫不包括domain相關(guān)操作)*/public static class Credentials {/*** system::system::jenkins等同于SystemCredentialsProvider::SystemContextResolver::jenkins* Provider可以通過java -jar jenkins-cli.jar -auth admin:admin -s http://xxx:8080/ -http list-credentials-providers獲取* Resolver可以通過java -jar jenkins-cli.jar -auth admin:admin -s http://xxx:8080/ -http list-credentials-context-resolvers獲取*/private static final String SYSTEM_STORE_ID = "system::system::jenkins";/*** 默認(rèn)全局domain*/private static final String GLOBAL_DOMAIN = "(global)";private static final String CREDENTIAL_NOT_FOUND = "No such credential";enum Operation {/*** 查詢Jenkins Credentials集合:list-credentials*/LIST_CREDENTIALS("list-credentials", "查詢Jenkins Credentials集合"),/*** 查詢Jenkins Credentials集合,返回xml:list-credentials-as-xml*/LIST_CREDENTIALS_AS_XML("list-credentials-as-xml", "查詢Jenkins Credentials集合,返回xml"),/*** 創(chuàng)建Jenkins Credentials:create-credentials-by-xml*/CREATE_CREDENTIALS("create-credentials-by-xml", "創(chuàng)建Jenkins Credentials"),/*** 更新Jenkins Credentials:create-credentials-by-xml*/UPDATE_CREDENTIALS("update-credentials-by-xml", "更新Jenkins Credentials"),/*** 刪除Jenkins Credentials:delete-credentials*/DELETE_CREDENTIALS("delete-credentials", "刪除Jenkins Credentials"),/*** 查詢Jenkins Credentials:get-credentials-as-xml*/GET_CREDENTIALS("get-credentials-as-xml", "查詢Jenkins Credentials"),;@Setter@Getterprivate String op;@Setter@Getterprivate String desc;Operation(String op, String desc) {this.setOp(op);this.setDesc(desc);}}/*** 創(chuàng)建Jenkins 憑證(憑證id為空時(shí),默認(rèn)使用36位UUID)** @param host          Jenkins地址,比如:http://10.100.57.156:8080* @param auth          Jenkins登錄用戶名:密碼,比如:admin:admin* @param credentialDto 憑證對象* @return ResultDto*/public static ResultDto createCredential(String host, String auth, CredentialDto credentialDto) {if (!StringUtils.hasText(credentialDto.getId())) {credentialDto.setId(UUID.randomUUID().toString());}String xml = CredentialDto.parseDto2Xml(credentialDto);CLI cli = doWork(host, auth, new String[]{Operation.CREATE_CREDENTIALS.op, SYSTEM_STORE_ID, ""}, PROTOCOL_HTTP, xml);int code = cli.code;String msg = cli.msg;return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto() : ResultDto.buildErrorDto().msg(msg);}/*** 刪除Jenkins 憑證** @param host         Jenkins地址,比如:http://10.100.57.156:8080* @param auth         Jenkins登錄用戶名:密碼,比如:admin:admin* @param credentialId 憑證id* @return ResultDto*/public static ResultDto deleteCredential(String host, String auth, String credentialId) {CLI cli = doWork(host, auth,new String[]{Operation.DELETE_CREDENTIALS.op, SYSTEM_STORE_ID, "", credentialId},PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;if (StringUtils.hasText(msg) && msg.contains(CREDENTIAL_NOT_FOUND)) {return ResultDto.buildSuccessDto();}return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto() : ResultDto.buildErrorDto().msg(msg);}/*** 更新Jenkins 憑證(憑證id無法修改)** @param host          Jenkins地址,比如:http://10.100.57.156:8080* @param auth          Jenkins登錄用戶名:密碼,比如:admin:admin* @param credentialDto 憑證對象* @return ResultDto*/public static ResultDto updateCredential(String host, String auth, CredentialDto credentialDto) {if (!StringUtils.hasText(credentialDto.getId())) {return ResultDto.buildErrorDto().msg("憑證id不能為空");}String xml = CredentialDto.parseDto2Xml(credentialDto);CLI cli = doWork(host, auth, new String[]{Operation.UPDATE_CREDENTIALS.op, SYSTEM_STORE_ID,GLOBAL_DOMAIN, credentialDto.getId()}, PROTOCOL_HTTP, xml);int code = cli.code;String msg = cli.msg;if (StringUtils.hasText(msg) && msg.contains(CREDENTIAL_NOT_FOUND)) {msg = "根據(jù)憑證id未找到對應(yīng)記錄";return ResultDto.buildErrorDto().msg(msg);}return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto() : ResultDto.buildErrorDto().msg(msg);}/*** 查詢Jenkins 憑證** @param host         Jenkins地址,比如:http://10.100.57.156:8080* @param auth         Jenkins登錄用戶名:密碼,比如:admin:admin* @param credentialId 憑證id* @return ResultDto*/public static ResultDto<CredentialDto> getCredential(String host, String auth, String credentialId) {CLI cli = doWork(host, auth,new String[]{Operation.GET_CREDENTIALS.op, SYSTEM_STORE_ID, "", credentialId},PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;if (StringUtils.hasText(msg) && msg.contains(CREDENTIAL_NOT_FOUND)) {msg = "根據(jù)憑證id未找到對應(yīng)記錄";return ResultDto.buildErrorDto().msg(msg);}boolean ifSuccess = ResultDto.SUCCESS.equals(String.valueOf(code));CredentialDto credentialDto = new CredentialDto();if (ifSuccess) {if (StringUtils.hasText(msg)) {CredentialDto.parseXmlStr2Dto(credentialDto, msg, null);}}return ifSuccess ? ResultDto.buildSuccess(credentialDto) : ResultDto.buildError(credentialDto).msg(msg);}/*** 查詢Jenkins上的憑證列表** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto<List<CredentialDto>> listCredentials(String host, String auth) {CLI cli = doWork(host, auth, new String[]{Operation.LIST_CREDENTIALS_AS_XML.op, SYSTEM_STORE_ID},PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;List<CredentialDto> credentialDtoList = new ArrayList<>(10);boolean ifSuccess = ResultDto.SUCCESS.equals(String.valueOf(code));if (ifSuccess) {CredentialDto.parseXmlStr2List(credentialDtoList, msg);}return ifSuccess ? ResultDto.buildSuccess(credentialDtoList) : ResultDto.buildError(credentialDtoList).msg(msg);}/*** 查詢Jenkins上的憑證列表** @param ip       Jenkins服務(wù)IP* @param port     Jenkins服務(wù)端口* @param username Jenkins服務(wù)登錄用戶名* @param password Jenkins服務(wù)登錄密碼* @return ResultDto*/public static ResultDto listCredentials(String ip, String port, String username, String password) {String host = "http://" + ip + ":" + port;String auth = username + ":" + password;return listCredentials(host, auth);}}/*** Jenkins Job相關(guān)操作(即Item)*/public static class Jobs {private static String JOB_BUILD_DETAIL_URL = "@host/job/@jobName/@buildId/api/json";private static String QUEUE_LIST_URL = "@host/job/@jobName/@buildId/api/json";enum Operation {/*** 創(chuàng)建Jenkins Job*/CREATE("create-job", "創(chuàng)建Jenkins Job"),/*** 復(fù)制Jenkins Job*/COPY("copy-job", "復(fù)制Jenkins Job"),/*** 更新Jenkins Job*/UPDATE("update-job", "更新Jenkins Job"),/*** 刪除Jenkins Job*/DELETE("delete-job", "刪除Jenkins Job"),/*** 構(gòu)建Jenkins Job*/BUILD("build", "構(gòu)建Jenkins Job"),/*** Jenkins Job構(gòu)建日志輸出*/CONSOLE("console", "Jenkins Job構(gòu)建日志輸出"),/*** 查詢Jenkins Job集合*/LIST("list-jobs", "查詢Jenkins Job集合"),/*** 查詢Jenkins Job*/GET("get-job", "查詢Jenkins Job"),/*** 將Jenkins Job添加到視圖中*/ADD_TO_VIEW("add-job-to-view", "將Jenkins Job添加到視圖中"),/*** 將Jenkins Job從視圖中移除*/REMOVE_FROM_VIEW("remove-job-from-view", "將Jenkins Job從視圖中移除"),/*** 啟用Jenkins Job*/ENABLE("enable-job", "啟用Jenkins Job"),/*** 禁用Jenkins Job*/DISABLE("disable-job", "禁用Jenkins Job"),/*** 重新加載Jenkins Job*/RELOAD("reload-job", "重新加載Jenkins Job"),/*** 停止構(gòu)建Jenkins Jobs*/STOP_BUILDS("stop-builds", "停止構(gòu)建Jenkins Job");@Setter@Getterprivate String op;@Setter@Getterprivate String desc;Operation(String op, String desc) {this.setOp(op);this.setDesc(desc);}}/*** 查詢Jenkins上的Job列表** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param auth     Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewName Jenkins視圖名稱,為空時(shí),查詢?nèi)縅obs* @return ResultDto*/public static ResultDto listJobs(String host, String auth, String viewName) {String[] baseArgs = new String[]{Operation.LIST.op};String[] finalArgs = StringUtils.hasText(viewName) ? Stream.concat(Arrays.stream(baseArgs),Arrays.stream(new String[]{viewName})).toArray(String[]::new) : baseArgs;CLI cli = doWork(host, auth, finalArgs, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;List<JobDto> jobDtoList = new ArrayList<>(10);boolean ifSuccess = ResultDto.SUCCESS.equals(String.valueOf(code));boolean listAllJobs = StringUtils.hasText(viewName) ? true : false;if (ifSuccess) {if (StringUtils.hasText(msg)) {String[] arr = msg.split(END_SYMBOL);for (String tmp : arr) {JobDto jobDto = new JobDto();jobDto.setJobName(tmp);jobDto.setViewName(listAllJobs ? viewName : "");jobDtoList.add(jobDto);}}}return ifSuccess ? ResultDto.buildSuccess(jobDtoList) : ResultDto.buildError(jobDtoList).msg(msg);}/*** 查詢Jenkins上的憑證列表** @param ip       Jenkins服務(wù)IP* @param port     Jenkins服務(wù)端口* @param username Jenkins服務(wù)登錄用戶名* @param password Jenkins服務(wù)登錄密碼* @param viewName Jenkins視圖名稱,為空時(shí),查詢?nèi)縅obs* @return ResultDto*/public static ResultDto listJobs(String ip, String port, String username, String password, String viewName) {String host = "http://" + ip + ":" + port;String auth = username + ":" + password;return listJobs(host, auth, viewName);}public static ResultDto addJob2View(String host, String auth, String viewName, String[] jobNames) {String[] baseArgs = new String[]{Operation.ADD_TO_VIEW.op};String[] finalArgs = Stream.of(baseArgs, new String[]{viewName}, jobNames).flatMap(Arrays::stream).toArray(String[]::new);CLI cli = doWork(host, auth, finalArgs, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;List<JobDto> jobDtoList = new ArrayList<>(10);return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccess(jobDtoList) : ResultDto.buildError(jobDtoList).msg(msg);}public static ResultDto addJob2View(String ip, String port, String username, String password,String viewName, String[] jobNames) {String host = "http://" + ip + ":" + port;String auth = username + ":" + password;return addJob2View(host, auth, viewName, jobNames);}public static ResultDto removeJobFromView(String host, String auth, String viewName, String[] jobNames) {String[] baseArgs = new String[]{Operation.REMOVE_FROM_VIEW.op};String[] finalArgs = Stream.of(baseArgs, new String[]{viewName}, jobNames).flatMap(Arrays::stream).toArray(String[]::new);CLI cli = doWork(host, auth, finalArgs, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;List<JobDto> jobDtoList = new ArrayList<>(10);return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccess(jobDtoList) : ResultDto.buildError(jobDtoList).msg(msg);}/*** 創(chuàng)建Job** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @param job  Jenkins Job* @return {@link ResultDto}*/public static ResultDto createJob(String host, String auth, JobDto job) {List<JobDto.SvnInfoDto> svnInfoDtoList = job.getSvnInfoList();List<JobDto.GitInfoDto> gitInfoDtoList = job.getGitInfoList();boolean scmCheck = CollectionUtils.isEmpty(svnInfoDtoList) && CollectionUtils.isEmpty(gitInfoDtoList);if (scmCheck) {return ResultDto.buildErrorDto().msg("源碼管理地址信息不能為空");}String xml = "<?xml version='1.1' encoding='UTF-8'?>\n" +"<project>\n" +"    <actions/>\n" +"    <description>" + job.getDescription() + "</description>\n" +"    <keepDependencies>false</keepDependencies>\n" +"    <properties/>\n";if (!CollectionUtils.isEmpty(svnInfoDtoList)) {xml += buildSvn(job);}if (!CollectionUtils.isEmpty(gitInfoDtoList)) {xml += buildGit(job);}xml += "        </locations>\n" +"        <excludedRegions></excludedRegions>\n" +"        <includedRegions></includedRegions>\n" +"        <excludedUsers></excludedUsers>\n" +"        <excludedRevprop></excludedRevprop>\n" +"        <excludedCommitMessages></excludedCommitMessages>\n" +"        <workspaceUpdater class=\"hudson.scm.subversion.UpdateUpdater\"/>\n" +"        <ignoreDirPropChanges>false</ignoreDirPropChanges>\n" +"        <filterChangelog>false</filterChangelog>\n" +"        <quietOperation>true</quietOperation>\n" +"    </scm>\n" +"    <canRoam>true</canRoam>\n" +"    <disabled>" + job.getDisabled() + "</disabled>\n" +"    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n" +"    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n" +"    <triggers/>\n" +"    <concurrentBuild>false</concurrentBuild>\n";xml += buildBuilders(job);xml += "    <publishers/>\n" +"    <buildWrappers/>\n" +"</project>";CLI cli = doWork(host, auth, new String[]{Operation.CREATE.op, job.getJobName()}, PROTOCOL_HTTP, xml);int code = cli.code;String msg = cli.msg;return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto() : ResultDto.buildErrorDto().msg(msg);}/*** 更新Job** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @param job  Jenkins Job* @return {@link ResultDto}*/public static ResultDto updateJob(String host, String auth, JobDto job) {//TODO:待補(bǔ)充完善return null;}/*** 刪除單個(gè)或多個(gè)Job** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param auth     Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobNames Jenkins Job名稱集* @return {@link ResultDto}*/public static ResultDto deleteJob(String host, String auth, String[] jobNames) {String[] finalArgs = Stream.of(new String[]{Operation.DELETE.op}, jobNames).flatMap(Arrays::stream).toArray(String[]::new);return operation(host, auth, finalArgs);}/*** 復(fù)制Job** @param host        Jenkins地址,比如:http://10.100.57.156:8080* @param auth        Jenkins登錄用戶名:密碼,比如:admin:admin* @param srcJobName  需要被復(fù)制的Jenkins Job名稱* @param destJobName 新Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto copyJob(String host, String auth, String srcJobName, String destJobName) {String[] finalArgs = new String[]{Operation.COPY.op, srcJobName, destJobName};return operation(host, auth, finalArgs);}/*** 查詢單個(gè)Job** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto<JobDto> getJob(String host, String auth, String jobName) {String[] finalArgs = new String[]{Operation.GET.op, jobName};ResultDto resultDto = operation(host, auth, finalArgs);JobDto jobDto = new JobDto();jobDto.setJobName(jobName);//解析xml,獲取名稱、描述等信息String msg = ObjectUtils.isEmpty(resultDto.getData()) ? "" : resultDto.getData().toString();if (StringUtils.hasText(msg)) {jobDto.parseXmlStr2Dto(msg);}return resultDto.data(jobDto);}/*** 構(gòu)建單個(gè)Job** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto buildJob(String host, String auth, String jobName) {return operation(host, auth, new String[]{Operation.BUILD.op, jobName});}/*** 輸出單個(gè)Job的構(gòu)建日志信息** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @param buildId 構(gòu)建id,為空時(shí),查詢最后一次構(gòu)建的信息* @return {@link ResultDto}*/public static ResultDto console(String host, String auth, String jobName, Integer buildId) {String[] baseArgs = new String[]{Operation.CONSOLE.op, jobName};String[] finalArgs = ObjectUtils.isEmpty(buildId) ? baseArgs : Stream.of(baseArgs, new String[]{buildId.toString()}).flatMap(Arrays::stream).toArray(String[]::new);return operation(host, auth, finalArgs);}/*** 禁用Job** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto disableJob(String host, String auth, String jobName) {return operation(host, auth, new String[]{Operation.DISABLE.op, jobName});}/*** 啟用Job** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto enableJob(String host, String auth, String jobName) {return operation(host, auth, new String[]{Operation.ENABLE.op, jobName});}/*** 重新加載Job** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobName Jenkins Job名稱* @return {@link ResultDto}*/public static ResultDto reloadJob(String host, String auth, String jobName) {return operation(host, auth, new String[]{Operation.RELOAD.op, jobName});}/*** 停止構(gòu)建Job** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param auth     Jenkins登錄用戶名:密碼,比如:admin:admin* @param jobNames Jenkins Job名稱集合* @return {@link ResultDto}*/public static ResultDto stopBuildJob(String host, String auth, String[] jobNames) {String[] finalArgs = Stream.of(new String[]{Operation.STOP_BUILDS.op}, jobNames).flatMap(Arrays::stream).toArray(String[]::new);return operation(host, auth, finalArgs);}/*** 獲取Jenkins Job的構(gòu)建信息** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param username Jenkins登錄用戶名* @param password Jenkins登錄用戶密碼* @param jobName  Jenkins Job名稱* @param buildId  Jenkins Job構(gòu)建id* @return {@link ResultDto}*/public static ResultDto<BuildInfoDto> getJobBuildInfoDetail(String host, String username, String password,String jobName, Integer buildId) {if (ObjectUtils.isEmpty(buildId)) {return ResultDto.buildErrorDto().msg("buildId can not empty.");}JenkinsClient client = JenkinsClient.builder().endPoint(host).credentials(username + ":" + password).build();List<QueueItem> list = client.api().queueApi().queue();for (QueueItem item : list) {System.out.println(item.why() + "   " + item.task().name());}System.out.println(JsonUtil.toJSONString(client.api().systemApi().systemInfo()));BuildInfo data = client.api().jobsApi().buildInfo(null, jobName, buildId);System.out.println(data.building());String url = JOB_BUILD_DETAIL_URL.replace("@host", host).replace("@jobName", jobName).replace("@buildId", buildId.toString());return doGet(url, username, password, BuildInfoDto.class);}/*** 獲取Jenkins Job的構(gòu)建信息** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param username Jenkins登錄用戶名* @param password Jenkins登錄用戶密碼* @param jobName  Jenkins Job名稱* @param buildId  Jenkins Job構(gòu)建id* @return {@link ResultDto}*/public static boolean getJobBuildStatus(String host, String username, String password,String jobName, Integer buildId) {if (ObjectUtils.isEmpty(buildId)) {throw new IllegalArgumentException("buildId can not empty.");}String url = JOB_BUILD_DETAIL_URL.replace("@host", host).replace("@jobName", jobName).replace("@buildId", buildId.toString());BuildInfoDto infoDto = getJobBuildInfoDetail(url, username, password, jobName, buildId).getData();return infoDto.getBuilding();}/*** 操作單個(gè)Job(查詢、啟用、禁用、刪除)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @param args Jenkins CLI參數(shù)* @return {@link ResultDto}*/private static ResultDto operation(String host, String auth, String[] args) {CLI cli = doWork(host, auth, args, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccess(msg) : ResultDto.buildError(msg).msg(msg);}/*** 組織Job的git xml章節(jié)內(nèi)容** @param job JobDto* @return {@link String}*/private static String buildGit(JobDto job) {//TODO:待補(bǔ)充組裝git相關(guān)xml配置String xml = "";return xml;}/*** 組織Job的svn xml章節(jié)內(nèi)容** @param job JobDto* @return {@link String}*/private static String buildSvn(JobDto job) {List<JobDto.SvnInfoDto> svnInfoDtoList = job.getSvnInfoList();String xml = "    <scm class=\"hudson.scm.SubversionSCM\" >\n" +"        <locations>\n";StringBuilder sb = new StringBuilder();for (JobDto.SvnInfoDto svnInfoDto : svnInfoDtoList) {sb.append("            <hudson.scm.SubversionSCM_-ModuleLocation>\n").append("                <remote>" + svnInfoDto.getRemote() + "</remote>\n").append("                <credentialsId>" + svnInfoDto.getCredentialsId() + "</credentialsId>\n").append("                <local>" + svnInfoDto.getLocal() + "</local>\n").append("                <depthOption>" + svnInfoDto.getDepthOption() + "</depthOption>\n").append("                <ignoreExternalsOption>" + svnInfoDto.getIgnoreExternalsOption() + "</ignoreExternalsOption>\n").append("                <cancelProcessOnExternalsFail>" + svnInfoDto.getCancelProcessOnExternalsFail() + "</cancelProcessOnExternalsFail>\n").append("            </hudson.scm.SubversionSCM_-ModuleLocation>\n");}xml += sb.toString();return xml;}/*** 組織Job的builders xml章節(jié)內(nèi)容** @param job JobDto* @return {@link String}*/private static String buildBuilders(JobDto job) {String xml = "";List<String> shellList = job.getBuildCmdList();List<JobDto.SonarRunnerBuilderDto> sonarRunnerBuilderDtoList = job.getSonarRunnerBuilderDtoList();boolean checkBuilders = CollectionUtils.isEmpty(shellList) && CollectionUtils.isEmpty(sonarRunnerBuilderDtoList);if (checkBuilders) {xml += "<builders/>";} else {xml += "    <builders>\n";if (!CollectionUtils.isEmpty(shellList)) {String shells = shellList.stream().collect(Collectors.joining("\n"));xml += "        <hudson.tasks.Shell>\n" +"            <command>" + shells +"            </command>\n" +"            <configuredLocalRules/>\n" +"        </hudson.tasks.Shell>\n";}if (!CollectionUtils.isEmpty(sonarRunnerBuilderDtoList)) {JobDto.ProjectInfo projectInfo = job.getProjectInfo();String keyInfo = projectInfo.getProjectName() + "_" + job.getJobName() + "_" + projectInfo.getBuildVersion();StringBuilder sb = new StringBuilder();for (JobDto.SonarRunnerBuilderDto sonar : sonarRunnerBuilderDtoList) {sb.append("        <hudson.plugins.sonar.SonarRunnerBuilder>\n").append("            <project></project>\n").append("            <properties>sonar.projectKey=" + keyInfo + "\n").append("sonar.projectName=" + keyInfo + "\n").append("sonar.projectVersion=" + projectInfo.getBuildVersion() + "\n").append("sonar.language=" + sonar.getSonarScannerLanguage() + "\n").append("sonar.sourceEncoding=UTF-8\n").append("sonar.java.binaries=target/classes\n").append("sonar.sources=.\n").append("sonar.login=" + job.getSonarLogin() + "\n").append("sonar.password=" + job.getSonarPassword() + "\n").append("sonar.scm.disabled=" + sonar.getSonarScmDisabled()).append("            </properties>\n").append("            <javaOpts>" + sonar.getJavaOpts() + "</javaOpts>\n").append("            <additionalArguments>" + sonar.getAdditionalArguments() + "</additionalArguments>\n").append("            <jdk>" + sonar.getJdk() + "</jdk>\n").append("            <task>" + sonar.getTask() + "</task>\n").append("        </hudson.plugins.sonar.SonarRunnerBuilder>\n");}xml += sb.toString();}xml += "    </builders>\n";}return xml;}}public static class Views {public enum Operation {/*** 創(chuàng)建Jenkins視圖*/CREATE("create-view", "創(chuàng)建Jenkins視圖"),/*** 更新Jenkins視圖*/UPDATE("update-view", "更新Jenkins視圖"),/*** 刪除Jenkins視圖*/DELETE("delete-view", "刪除Jenkins視圖"),/*** 查詢Jenkins視圖*/GET("get-view", "查詢Jenkins視圖");@Setter@Getterprivate String op;@Setter@Getterprivate String desc;Operation(String op, String desc) {this.setOp(op);this.setDesc(desc);}}/*** 創(chuàng)建View** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewDto ViewDto* @return {@link ResultDto}*/public static ResultDto createView(String host, String auth, ViewDto viewDto) {return operation(host, auth, viewDto, Operation.CREATE);}/*** 更新View** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewDto ViewDto* @return {@link ResultDto}*/public static ResultDto updateView(String host, String auth, ViewDto viewDto) {return operation(host, auth, viewDto, Operation.UPDATE);}/*** 刪除View** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewDto ViewDto* @return {@link ResultDto}*/public static ResultDto deleteView(String host, String auth, ViewDto viewDto) {return operation(host, auth, viewDto, Operation.DELETE);}/*** 重命名View** @param host        Jenkins地址,比如:http://10.100.57.156:8080* @param auth        Jenkins登錄用戶名:密碼,比如:admin:admin* @param oldViewName Jenkins舊視圖名稱* @param newViewName Jenkins新視圖名稱* @return ResultDto*/public static ResultDto rename(String host, String auth, String oldViewName, String newViewName) {return copyOrRenameView(host, auth, oldViewName, newViewName, true);}/*** 拷貝View** @param host        Jenkins地址,比如:http://10.100.57.156:8080* @param auth        Jenkins登錄用戶名:密碼,比如:admin:admin* @param oldViewName Jenkins舊視圖名稱* @param newViewName Jenkins新視圖名稱* @return ResultDto*/public static ResultDto copyView(String host, String auth, String oldViewName, String newViewName) {return copyOrRenameView(host, auth, oldViewName, newViewName, false);}/*** 根據(jù)視圖名稱查詢視圖信息** @param host             Jenkins地址,比如:http://10.100.57.156:8080* @param auth             Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewName         Jenkins視圖名稱* @param returnJobDetails 是否返回Job詳細(xì)信息,默認(rèn)不返回。* @return {@link ResultDto}*/public static ResultDto<ViewDto> getView(String host, String auth, String viewName, Boolean returnJobDetails) {if (!StringUtils.hasText(viewName)) {return ResultDto.buildErrorDto().msg("視圖名稱不能為空");}CLI cli = doWork(host, auth, new String[]{Operation.GET.op, viewName}, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;boolean ifSuccess = ResultDto.SUCCESS.equals(String.valueOf(code));ViewDto viewDto = new ViewDto();viewDto.setViewName(viewName);//解析xml,獲取view名稱、描述、關(guān)聯(lián)的job等信息if (StringUtils.hasText(msg)) {viewDto.parseXmlStr2Dto(msg);}if (ObjectUtils.isEmpty(returnJobDetails)) {returnJobDetails = false;}if (returnJobDetails) {List<JobDto> jobDtoList = viewDto.getJobList();for (JobDto jobDto : jobDtoList) {String jobName = jobDto.getJobName();JobDto dto = Jobs.getJob(host, auth, jobName).getData();BeanUtils.copyProperties(dto, jobDto);}}return ifSuccess ? ResultDto.buildSuccess(viewDto) : ResultDto.buildError(viewDto).msg(msg);}/*** 拷貝或重命名View** @param host        Jenkins地址,比如:http://10.100.57.156:8080* @param auth        Jenkins登錄用戶名:密碼,比如:admin:admin* @param oldViewName Jenkins舊視圖名稱* @param newViewName Jenkins新視圖名稱* @return ResultDto*/private static ResultDto copyOrRenameView(String host, String auth, String oldViewName, String newViewName, boolean rename) {//1、先查詢目標(biāo)ViewResultDto<ViewDto> oldViewInfoResult = getView(host, auth, oldViewName, true);if (!oldViewInfoResult.ifSuccess()) {return oldViewInfoResult;}ViewDto newViewInfo = new ViewDto();ViewDto oldViewInfo = oldViewInfoResult.getData();BeanUtils.copyProperties(oldViewInfo, newViewInfo);newViewInfo.setViewName(newViewName);//2、拷貝目標(biāo)View內(nèi)容,并重命名ResultDto createResult = operation(host, auth, newViewInfo, Operation.CREATE);if (!createResult.ifSuccess()) {return createResult;}List<JobDto> jobDtoList = oldViewInfo.getJobList();if (CollectionUtils.isEmpty(jobDtoList)) {return createResult;}String[] jobNames = new String[jobDtoList.size()];for (int i = 0; i < jobDtoList.size(); i++) {jobNames[i] = jobDtoList.get(i).getJobName();}ResultDto addJob2ViewResult = Jobs.addJob2View(host, auth, newViewName, jobNames);if (!addJob2ViewResult.ifSuccess()) {return addJob2ViewResult;}if (rename) {//3、再刪除舊Viewreturn operation(host, auth, oldViewInfo, Operation.DELETE);} else {return ResultDto.buildSuccessDto();}}/*** @param host    Jenkins地址,比如:http://10.100.57.156:8080* @param auth    Jenkins登錄用戶名:密碼,比如:admin:admin* @param viewDto ViewDto* @param op      操作:create-view、update-view、delete-view* @return {@link ResultDto}*/private static ResultDto operation(String host, String auth, ViewDto viewDto, Operation op) {String operation = op.op;String xml = "<?xml version=\"1.1\" encoding=\"UTF-8\"?>\n" +"<hudson.model.ListView>\n" +"    <name>" + viewDto.getViewName() + "</name>\n" +"    <description>" + viewDto.getDescription() + "</description>\n" +"    <filterExecutors>" + viewDto.isFilterExecutors() + "</filterExecutors>\n" +"    <filterQueue>" + viewDto.isFilterQueue() + "</filterQueue>\n" +"    <properties class=\"hudson.model.View$PropertyList\"/>\n" +"    <jobNames>\n" +"        <comparator class=\"java.lang.String$CaseInsensitiveComparator\"/>\n" +"    </jobNames>\n" +"    <jobFilters>\n" +"    </jobFilters>\n" +"    <columns>\n" +"        <hudson.views.StatusColumn/>\n" +"        <hudson.views.WeatherColumn/>\n" +"        <hudson.views.JobColumn/>\n" +"        <hudson.views.LastSuccessColumn/>\n" +"        <hudson.views.LastFailureColumn/>\n" +"        <hudson.views.LastStableColumn/>\n" +"        <hudson.views.LastDurationColumn/>\n" +"        <hudson.views.BuildButtonColumn/>\n" +"        <jenkins.branch.DescriptionColumn />\n" +"    </columns>\n";if (StringUtils.hasText(viewDto.getIncludeRegex())) {xml += "    <includeRegex>" + viewDto.getIncludeRegex() + "</includeRegex>\n";}xml += "    <recurse>" + viewDto.isRecurse() + "</recurse>\n" +"</hudson.model.ListView>";boolean isUpdateOrDelete = Operation.DELETE.equals(op) || Operation.UPDATE.equals(op);String[] finalArgs = isUpdateOrDelete ?new String[]{operation, viewDto.getViewName()} : new String[]{operation};CLI cli = doWork(host, auth, finalArgs, PROTOCOL_HTTP, xml);int code = cli.code;String msg = cli.msg;return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto() : ResultDto.buildErrorDto().msg(msg);}}public static class JenkinsSystem {public enum Operation {/*** 獲取Jenkins支持的命令*/HELP("help", "獲取Jenkins支持的命令"),/*** 獲取Jenkins版本信息*/VERSION("version", "獲取Jenkins版本信息"),/*** 更新Jenkins全局配置信息*/RELOAD_CONFIGURATION("reload-configuration", "更新Jenkins全局配置信息"),/*** 重啟Jenkins服務(wù)*/RESTART("restart", "重啟Jenkins服務(wù)"),/*** 安全重啟Jenkins服務(wù)(Safe Restart Jenkins. Don’t start any builds.)*/SAFE_RESTART("safe-restart", "重啟Jenkins服務(wù)"),/*** 停止Jenkins服務(wù)*/SHUTDOWN("shutdown", "停止Jenkins服務(wù)"),/*** 安全停止Jenkins服務(wù)(Puts Jenkins into the quiet mode, wait for existing builds to be completed,* and then shut down Jenkins.)*/SAFE_SHUTDOWN("safe-shutdown", "安全停止Jenkins服務(wù)"),/*** 清除Jenkins中的構(gòu)建隊(duì)列(Clears the build queue.)*/CLEAR_QUEUE("clear-queue", "清除Jenkins中的構(gòu)建隊(duì)列"),;@Setter@Getterprivate String op;@Setter@Getterprivate String desc;Operation(String op, String desc) {this.setOp(op);this.setDesc(desc);}}/*** 獲取Jenkins支持的命令** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto help(String host, String auth) {return operation(host, auth, Operation.HELP);}/*** 獲取Jenkins版本信息** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto getVersion(String host, String auth) {return operation(host, auth, Operation.VERSION);}/*** 重啟Jenkins服務(wù)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto restart(String host, String auth) {return operation(host, auth, Operation.RESTART);}/*** 安全重啟Jenkins服務(wù)(Safe Restart Jenkins. Don’t start any builds.)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto safeRestart(String host, String auth) {return operation(host, auth, Operation.SAFE_RESTART);}/*** 停止Jenkins服務(wù)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto shutdown(String host, String auth) {return operation(host, auth, Operation.SHUTDOWN);}/*** 安全停止Jenkins服務(wù)(Puts Jenkins into the quiet mode, wait for existing builds to be completed,* and then shut down Jenkins.)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto safeShutdown(String host, String auth) {return operation(host, auth, Operation.SAFE_SHUTDOWN);}/*** 清除Jenkins中的構(gòu)建隊(duì)列(Clears the build queue.)** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto clearQueue(String host, String auth) {return operation(host, auth, Operation.CLEAR_QUEUE);}/*** 重新加載Jenkins配置信息* Discard all the loaded data in memory and reload everything from file system.* Useful when you modified config files directly on disk.** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @return ResultDto*/public static ResultDto reloadConfiguration(String host, String auth) {return operation(host, auth, Operation.RELOAD_CONFIGURATION);}/*** 基本操作** @param host Jenkins地址,比如:http://10.100.57.156:8080* @param auth Jenkins登錄用戶名:密碼,比如:admin:admin* @param op   操作* @return {@link ResultDto}*/private static ResultDto operation(String host, String auth, Operation op) {CLI cli = doWork(host, auth, new String[]{op.op}, PROTOCOL_HTTP, null);int code = cli.code;String msg = cli.msg;String successMsg = StringUtils.hasText(msg) ? msg.replaceAll(END_SYMBOL, "") : "";return ResultDto.SUCCESS.equals(String.valueOf(code)) ?ResultDto.buildSuccessDto(successMsg) : ResultDto.buildErrorDto().msg(msg);}}/*** 調(diào)用Jenkins CLI* 注意:查詢類時(shí)xml為空;涉及到使用xml內(nèi)容創(chuàng)建、更新操作的,xml不能為空!!!** @param host     Jenkins地址,比如:http://10.100.57.156:8080* @param auth     Jenkins登錄用戶名:密碼,比如:admin:admin* @param args     請求參數(shù)* @param protocol 請求協(xié)議,比如http,webSocket,默認(rèn)http* @param xml      處理XML相關(guān),不使用標(biāo)準(zhǔn)輸入流,此時(shí)使用HTTP協(xié)議調(diào)用* @return CLI*/private static CLI doWork(String host, String auth, String[] args, String protocol, String xml) {if (null == args || args.length == 0) {throw new IllegalArgumentException("args cannot be empty");}if (!StringUtils.hasText(protocol)) {protocol = PROTOCOL_HTTP;}byte[] xmlData = new byte[]{};if (StringUtils.hasText(xml)) {xmlData = xml.getBytes(StandardCharsets.UTF_8);}CLI cli = new CLI();String[] baseArgs = new String[]{"-auth", auth, "-s", host, protocol};String[] finalArgs = Stream.concat(Arrays.stream(baseArgs), Arrays.stream(args)).toArray(String[]::new);log.info("executing command: {}", JsonUtil.toJSONString(finalArgs));try {cli._main(finalArgs, xmlData);} catch (Exception e) {cli.code = -1;cli.msg = e.getMessage();log.error("executing command: {} cause error ", JsonUtil.toJSONString(finalArgs), e);}return cli;}private static <T> ResultDto<T> doGet(String urlString, String username, String password, Class clz) {URI uri = URI.create(urlString);HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());CredentialsProvider credsProvider = new BasicCredentialsProvider();credsProvider.setCredentials(new AuthScope(uri.getHost(), uri.getPort()), new UsernamePasswordCredentials(username, password));AuthCache authCache = new BasicAuthCache();BasicScheme basicAuth = new BasicScheme();authCache.put(host, basicAuth);CloseableHttpClient httpClient = HttpClients.custom().setDefaultCredentialsProvider(credsProvider).build();HttpGet httpGet = new HttpGet(uri);HttpClientContext localContext = HttpClientContext.create();localContext.setAuthCache(authCache);if (ObjectUtils.isEmpty(clz)) {clz = String.class;}T data = (T) new Object();try {CloseableHttpResponse response = httpClient.execute(host, httpGet, localContext);String returnMsg = EntityUtils.toString(response.getEntity());System.out.println(returnMsg);if (StringUtils.hasText(returnMsg)) {data = (T) JsonUtil.string2Obj(returnMsg, clz);return ResultDto.buildSuccessDto().data(data);}return ResultDto.buildSuccessDto().data(returnMsg);} catch (Exception e) {log.error("call {} failed", urlString, e);return ResultDto.buildErrorDto().data(data);}}
}
http://www.risenshineclean.com/news/7710.html

相關(guān)文章:

  • 網(wǎng)站負(fù)責(zé)人半身照b站推廣入口2023
  • 免費(fèi)app做logo的網(wǎng)站昆明網(wǎng)站開發(fā)推廣公司
  • 做加密網(wǎng)站全站加密的最低成本seo用什么論壇引流
  • 國內(nèi)十大網(wǎng)站制作公司站長工具關(guān)鍵詞
  • 紫搜做網(wǎng)站怎么樣在百度上免費(fèi)推廣
  • 濰坊網(wǎng)站建設(shè)中公seo外包如何
  • 網(wǎng)站編輯怎么做內(nèi)容分類網(wǎng)站搜索引擎優(yōu)化
  • 安卓應(yīng)用市場官方版下載哈爾濱seo推廣優(yōu)化
  • 跨境獨(dú)立站建站平臺(tái)有哪些今日熱點(diǎn)新聞事件2021
  • 鷹潭網(wǎng)站建設(shè)yt1983品牌營銷策劃怎么寫
  • 網(wǎng)站建設(shè)與維護(hù)面試排名app
  • 義烏做網(wǎng)站網(wǎng)站推廣方法大全
  • 萬網(wǎng)怎樣做網(wǎng)站調(diào)試專業(yè)地推團(tuán)隊(duì)電話
  • 上海做網(wǎng)站公司google推廣服務(wù)商
  • 威海做網(wǎng)站的百度鏈接收錄
  • 好上手的做海報(bào)網(wǎng)站人工智能培訓(xùn)機(jī)構(gòu)
  • php框架做網(wǎng)站的好處視頻號(hào)排名優(yōu)化帝搜軟件
  • 在喵窩網(wǎng)站怎么做圖無排名優(yōu)化
  • 現(xiàn)在做網(wǎng)站用什么工具直播:英格蘭vs法國
  • 通過域名打開網(wǎng)站是做映射么保健品的營銷及推廣方案
  • 中企動(dòng)力科技股份有限公司南通分公司seo應(yīng)該如何做
  • 分類信息網(wǎng)站怎么做SEOseo營銷培訓(xùn)咨詢
  • 設(shè)計(jì)雜志官網(wǎng)seo技術(shù)助理
  • asp.net網(wǎng)站打不開html頁面月嫂免費(fèi)政府培訓(xùn)中心
  • 住房和城鄉(xiāng)建設(shè)部網(wǎng)站登錄平臺(tái)推廣網(wǎng)站
  • 網(wǎng)站建設(shè)主要做什么官網(wǎng)seo優(yōu)化
  • 網(wǎng)站建設(shè)下坡路江小白網(wǎng)絡(luò)營銷案例
  • 網(wǎng)站建設(shè)方案批發(fā)網(wǎng)頁搜索引擎優(yōu)化技術(shù)
  • 手機(jī)終端網(wǎng)站國內(nèi)seo公司排名
  • 免費(fèi)網(wǎng)站建設(shè)ppt模板關(guān)鍵詞優(yōu)化是什么工作