小编BLa*_*ang的帖子

Jenkins 重启后报告插件的循环依赖错误,现在无法启动

我们重新启动了 jenkins LTS 2.303.3(使用 JCaSC 插件重新启动后会重新下载所有插件),并在日志中看到以下错误:

2022-07-27 17:59:00.565+0000 [id=31] SEVERE hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:sshd
2022-07-27 17:59:00.569+0000 [id=31] SEVERE hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:sshd
2022-07-27 17:59:00.570+0000 [id=31] SEVERE hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> …
Run Code Online (Sandbox Code Playgroud)

jenkins jcasc

8
推荐指数
1
解决办法
3231
查看次数

詹金斯工作进度条的实时反馈

我正在寻找一种方法来显示詹金斯中构建的构建进度栏,以便能够在我的应用程序上显示。我还没有找到任何 API 调用来缩小范围,所以我正在寻找方向!

这是我在该任务中找到的最接近的帖子,但它只显示构建完成后的持续时间。

如何通过API获取正在运行的jenkins作业的进度条数据

jenkins jenkins-plugins

6
推荐指数
0
解决办法
1242
查看次数

python kubernetes手表pod日志不起作用

尝试使用 python kubernetes API 来流式传输 kubernetes pod 日志的输出。(最终目标是通过 websocket 流输出日志)

基于合并到 python kubernetes 模块的这个PR,我认为 watch 可以与 read_namespaced_pod_log 一起使用?

v1 = client.CoreV1Api()
w = watch.Watch()
for e in w.stream(v1.read_namespaced_pod_log, name=pod, namespace=namespace, follow=True, tail_lines=1, limit_bytes=560, _preload_content=False):
   print(e)
Run Code Online (Sandbox Code Playgroud)

但是我收到下面的错误,我是否错过了需要传递给观看的东西?或 read_namespaced_pod_log?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 132, in stream
    resp = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 18538, in read_namespaced_pod_log
    (data) = self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 18576, in read_namespaced_pod_log_with_http_info
    " to method …
Run Code Online (Sandbox Code Playgroud)

python kubernetes

4
推荐指数
1
解决办法
2345
查看次数

如何将 groovy 变量传递给 shell 块 jenkins

我有一个 groovy 变量,我想将其传递给 shell 块以进行进一步处理,但是我不断收到以下粘贴的错误:

stages {      
    stage('First Stage - echo out available variables'){
        steps{

            script {
                def string_var = "im a groovy variable"
                echo "${string_var}"   // This will print "im a groovy variable" just fine
                sh """
                    echo """ + string_var + """
                """  // This will error

                sh """
                    echo ${string_var} 
                """  // This will error

                sh ''' echo '''+ string_var +''' '''

                sh "echo ${string_var}" // This will error
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我的错误:

an exception which …
Run Code Online (Sandbox Code Playgroud)

groovy jenkins

3
推荐指数
1
解决办法
5736
查看次数

在powershell中concat两个字符串并作为一个参数提供

我试图将两个字符串合并为一个变量,然后将新变量作为参数添加到命令中

$firstName = Read-Host -Prompt 'enter user first name'
$lastName = Read-Host -Prompt 'enter user last name'
$userAblevetsEmail = '' + $firstName + '.' + $lastName + '@company.com'
New-MsolUser -UserPrincipalName $userAblevetsEmail  -DisplayName $firstName + " " + $lastName -FirstName $firstName
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

"New-MsolUser:找不到接受参数'+'的位置参数."

string powershell concatenation

2
推荐指数
1
解决办法
1万
查看次数

更改 Windows 计算机名称 BAT 文件

我想根据用户使用 BAT 文件的输入更改 Windows 7 机器的名称。我要更改的名称是高级系统设置中的计算机名称。(见下面的屏幕截图)

在此处输入图片说明

下面的代码是我尝试过的,但不起作用。我也试过以管理员身份运行代码,然后重新启动,也没有奏效。

SET /P PCNAME=Please enter your name: 
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName /t REG_SZ /d %PCNAME% /f
Run Code Online (Sandbox Code Playgroud)

batch-file

1
推荐指数
1
解决办法
2万
查看次数

Python kubernetes 模块没有属性“api_key”

我已经通过 pip install https://github.com/kubernetes-client/python/blob/master/kubernetes/README.md通过这里的说明安装了 python kubernetes 模块,但我似乎仍然无法运行他们的示例,因为我收到一个属性错误。

代码:

from __future__ import print_function
import time
import kubernetes.client
from kubernetes.client.rest import ApiException
from pprint import pprint

# Configure API key authorization: BearerToken
kubernetes.client.configuration.api_key['authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# kubernetes.client.configuration.api_key_prefix['authorization'] = 'Bearer'
# create an instance of the API class
api_instance = kubernetes.client.AdmissionregistrationApi()

try:
    api_response = api_instance.get_api_group()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdmissionregistrationApi->get_api_group: %s\n" % e)
Run Code Online (Sandbox Code Playgroud)

错误:

Traceback …
Run Code Online (Sandbox Code Playgroud)

python kubernetes

0
推荐指数
1
解决办法
1727
查看次数