-
Notifications
You must be signed in to change notification settings - Fork 519
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656 #12727
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
Open
yjieliang
wants to merge
28
commits into
TencentBlueKing:master
Choose a base branch
from
yjieliang:feat-12656
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
39ad5b9
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 49d84ec
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 0539867
Merge branch 'refs/heads/master' into feat-12656
yjieliang f377f8c
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang be91195
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang b305e93
Merge remote-tracking branch 'origin/master' into feat-12656
yjieliang 2eed75e
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang ddf98e1
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang a80cde2
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 488dee9
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 5299dc5
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 89817aa
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang b0f043e
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang afa1c3c
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 3210803
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 82f08c9
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang b051be9
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang a51c481
Merge branch 'master' into feat-12656
yjieliang 357992a
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang c631a7e
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 3f73090
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 75f7bc5
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang e07387b
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 2ddedab
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang 7ff8a2e
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang e77946c
Merge remote-tracking branch 'origin/master' into feat-12656
yjieliang 13672ca
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang f756a23
feat:python插件支持编译运行的时使用独立虚拟环境执行#12656
yjieliang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
60 changes: 60 additions & 0 deletions
60
...ore/src/main/kotlin/com/tencent/devops/store/common/service/AtomWhitelistConfigService.kt
This file contains hidden or 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,60 @@ | ||
| /* | ||
| * Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. | ||
| * | ||
| * Copyright (C) 2019 Tencent. All rights reserved. | ||
| * | ||
| * BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. | ||
| * | ||
| * A copy of the MIT License is included in this file. | ||
| * | ||
| * | ||
| * Terms of the MIT License: | ||
| * --------------------------------------------------- | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
| * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
| * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
| * permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
| * the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT | ||
| * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
| * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
|
|
||
| package com.tencent.devops.store.common.service | ||
|
|
||
| import com.fasterxml.jackson.core.type.TypeReference | ||
| import com.tencent.devops.common.api.util.JsonUtil | ||
| import org.slf4j.LoggerFactory | ||
| import org.springframework.beans.factory.annotation.Autowired | ||
| import org.springframework.stereotype.Service | ||
|
|
||
| @Service | ||
| class AtomWhitelistConfigService @Autowired constructor( | ||
| private val businessConfigService: BusinessConfigService | ||
| ) { | ||
| private val logger = LoggerFactory.getLogger(AtomWhitelistConfigService::class.java) | ||
|
|
||
| fun isAtomInWhitelist(atomCode: String, whitelistType: String): Boolean { | ||
| return try { | ||
| val configValue = businessConfigService.getConfigValue( | ||
| business = "ATOM", | ||
| feature = "ATOM_WHITELIST", | ||
| businessValue = whitelistType | ||
| ) | ||
| val atomCodes = if (configValue != null) { | ||
| JsonUtil.to(configValue, object : TypeReference<List<String>>() {}) | ||
| } else { | ||
| emptyList() | ||
| } | ||
| atomCodes.contains(atomCode) | ||
| } catch (ignored: Throwable) { | ||
| logger.warn("isAtomInWhitelist failed|atomCode=$atomCode|whitelistType=$whitelistType", ignored) | ||
| false | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
重构把各实现里的 System.setProperty(BK_CI_ATOM_EXECUTE_ENV_PATH, ...) 全部删掉了(改成 return)。但内部AtomRunEnvPrepareTask 插件仍在用旧的读取方式: val atomExecutePath = System.getProperty(BK_CI_ATOM_EXECUTE_ENV_PATH)