我正在尝试使用Active Choice Reactive Reference Parameter插件在我的参数化 Jenkins 作业中有一个“更新按钮”。它将调用 API 并获取值,但现在我有一个简单的 js,它使用新值更新 html 表中的单元格。我已经在 Jenkins 之外测试了按钮和 javascript,它工作正常。但是当我将它添加到 Jenkins 并单击按钮时,它会启动 Jenkins 作业而不是更新单元格。
使用的示例 Groovy:
upHTML=
'''
<!DOCTYPE html>
function update(){
// Get all the rows of the table
var rows = document.getElementById("tb1").rows;
var r= "0"
var c= "1"
var col = rows[r].cells;
// Target row with the target col (target cell) changed with the new value
col[c].innerHTML = "New Value";
}
</script>
'''
return upHTML
Run Code Online (Sandbox Code Playgroud)
该按钮是可见的,但它会在单击后立即启动 Jenkins 作业。
我正在使用 AWS Amplify 添加社交签名。通过谷歌,我收到了用户的电子邮件,但在 Facebook 中丢失了。
这是我的代码:
federatedSignIn(provider: any): void {
switch (provider) {
case 'facebook':
console.log("Authenticating using Facebook");
Auth.federatedSignIn({ provider: CognitoHostedUIIdentityProvider.Facebook });
break;
case 'google':
console.log("Authenticating using Google");
Auth.federatedSignIn({ provider: CognitoHostedUIIdentityProvider.Google });
break;
}
}
Run Code Online (Sandbox Code Playgroud)
这就是“预注册”Lambda 所视为的事件。
{
"version": "1",
"region": "us-east-1",
"userPoolId": "us-east-xxxxxx",
"userName": "Facebook_123456",
"callerContext": {
"awsSdkVersion": "aws-sdk-unknown-unknown",
"clientId": "123456abcd"
},
"triggerSource": "PreSignUp_ExternalProvider",
"request": {
"userAttributes": {
"email_verified": "false",
"cognito:email_alias": "",
"phone_number_verified": "false",
"cognito:phone_number_alias": ""
},
"validationData": {}
},
"response": {
"autoConfirmUser": false,
"autoVerifyEmail": false,
"autoVerifyPhone": false …Run Code Online (Sandbox Code Playgroud)