Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· openaiHugging Face Suzhen/CodeChat

在Azure Pipelines中添加一个release的stage来将应用程序上传至Incapptic。要具体的执行脚本,包含 curl -X POST…

  1. User

    在Azure Pipelines中添加一个release的stage来将应用程序上传至Incapptic。要具体的执行脚本,包含 curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H ‘x-connect-token:11:xxx’ -F ‘artifact-81=@./drop/xxx.ipa’ 的上传命令,还要能显示错误信息。

  2. Assistant

    要在Azure Pipelines中添加一个release的stage来将应用程序上传至Incapptic,你可以按照以下步骤操作:

    1. 打开Azure Pipelines,在你的项目中创建一个新的release pipeline。
    2. 在release pipeline中,为你的应用程序创建一个新的stage。
    3. 在stage的任务列表中,点击"添加任务"按钮。
    4. 在任务列表中,选择"脚本"分类,并选择"命令行脚本"。
    5. 在"命令行脚本"任务的详细设置中,将脚本命令输入到"脚本"字段中。命令如下:
    curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H 'x-connect-token:11:xxx' -F 'artifact-81=@./drop/xxx.ipa'
    

    确保你将命令中的"xxx"替换为你的实际值。

    1. 为了能够显示错误信息,在"脚本"字段下方的"高级"选项中,勾选"失败时继续"。

    保存并发布你的release pipeline,这样当你运行release时,应用程序将上传至Incapptic。如果上传失败,你将能够在任务日志中看到错误信息。

  3. User

    Binary of the FieldLink-NI-Test app upload initiated. For more information, check Audit Logs or app logs

  4. Assistant

    若要在Azure Pipelines中添加一个release的stage来将FieldLink-NI-Test应用程序上传至Incapptic,并在上传过程中显示附加信息,请按照以下步骤进行操作:

    1. 打开Azure Pipelines,在你的项目中创建一个新的release pipeline。
    2. 在release pipeline中,为你的应用程序创建一个新的stage。
    3. 在stage的任务列表中,点击"添加任务"按钮。
    4. 在任务列表中,选择"脚本"分类,并选择"命令行脚本"。
    5. 在"命令行脚本"任务的详细设置中,将以下脚本命令输入到"脚本"字段中:
    curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H 'x-connect-token:11:xxx' -F 'artifact-81=@./drop/FieldLink-NI-Test.ipa' && echo "Binary of the FieldLink-NI-Test app upload initiated. Please check Audit Logs or app logs for more information"
    

    确保你将命令中的"xxx"替换为你的实际值,并将"FieldLink-NI-Test.ipa"替换为相应的应用程序文件名。

    1. 为了能够显示附加信息,该脚本将在上传命令执行成功后打印一条消息。这条消息会提示检查Audit Logs或app logs以获取更多信息。

    保存并发布你的release pipeline,这样当你运行release时,FieldLink-NI-Test应用程序将上传至Incapptic。你可以在任务日志中查看上传状态,并在输出中找到附加信息提示。

  5. User

    上传后打印的最后一条消息是Binary of the FieldLink-NI-Test app upload initiated. For more information, check Audit Logs or app logs。

  6. Assistant

    非常抱歉,对于上一个答案中给出的最后一条消息,实际应该是"Binary of the FieldLink-NI-Test app upload initiated. For more information, check Audit Logs or app logs"。这条消息表明应用程序的二进制文件已启动上传,并提供了进一步检查审核日志或应用程序日志以获取更多信息的建议。

    以下是更新后的脚本命令以打印正确的最后一条消息:

    curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H 'x-connect-token:11:xxx' -F 'artifact-81=@./drop/FieldLink-NI-Test.ipa' && echo "Binary of the FieldLink-NI-Test app upload initiated. For more information, check Audit Logs or app logs"
    

    再次对之前的错误表示歉意,并感谢你的指正。

  7. User

    为了能够显示错误信息,在"脚本"字段下方的"高级"选项中,勾选了"失败时继续"。最后显示的错误信息是Binary of the FieldLink-NI-Test app upload initiated. For more information, check Audit Logs or app logs

  8. Assistant

    非常抱歉,之前给出的指导有误。由于Azure Pipelines中的"命令行脚本"任务无法自动将curl命令的错误信息显示出来,因此无法直接显示错误信息。请不要勾选"失败时继续"选项,以便在出现错误时停止任务并显示错误信息。

    更新后的脚本命令如下:

    curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H 'x-connect-token:11:xxx' -F 'artifact-81=@./drop/FieldLink-NI-Test.ipa' || echo "Failed to upload the binary of the FieldLink-NI-Test app. For more information, check Audit Logs or app logs."
    

    确保你将命令中的"xxx"替换为你的实际值,并将"FieldLink-NI-Test.ipa"替换为相应的应用程序文件名。

    这条更新后的命令将在上传命令执行失败时显示一条失败消息,并提示检查审核日志或应用程序日志以获取更多信息。

    再次对之前的错误表示歉意,并感谢你的指正。

  9. User

    需要显示错误信息,这条错误信息是什么原因导致的呢

  10. Assistant

    非常抱歉之前的回答还是有误。如果你希望在Azure Pipelines中执行curl命令时能够显示错误信息,可以使用以下脚本命令:

    curl -X POST https://schindler.incapptic.net/apps/upload-artifact -H 'x-connect-token:11:xxx' -F 'artifact-81=@./drop/FieldLink-NI-Test.ipa' 2>&1 || echo "Error: Failed to upload the binary of the FieldLink-NI-Test app. For more information, check Audit Logs or app logs."
    

    在这个命令中,我们使用了2>&1将curl命令的标准错误(STDERR)重定向到标准输出(STDOUT),这样它们就会一起显示出来。然后,我们使用||操作符,当curl命令返回非零退出代码(表示发生错误)时,执行错误消息的echo语句。

    请确保将命令中的"xxx"替换为你的实际值,并将"FieldLink-NI-Test.ipa"替换为相应的应用程序文件名。

    这样,如果上传命令出现错误,将会将错误消息显示出来,并提供更多信息以检查审核日志或应用程序日志。对之前的错误信息再次表示歉意,并感谢你的指正。