简体   繁体   English

Azure DevOps Magento 2 管道

[英]Azure DevOps Magento 2 Pipeline

I am facing an error while I'm making CI of Magento using Azure DevOps.我在使用 Azure DevOps 制作 Magento 的 CI 时遇到错误。

In AuthHelper.php line 197:
                                                                               
  The 'https://repo.magento.com/archives/magento/framework/magento-framework-  
  103.0.3.0.zip' URL required authentication (HTTP 401).                       
  You must be using the interactive console to authenticate                    
                                                                               

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

##[debug]Exit code 255 received from tool '/usr/bin/bash'
##[debug]STDIO streams have closed for tool '/usr/bin/bash'
##[error]Bash exited with code '255'.
##[debug]Processed:
##vso[task.issue type=error;]Bash exited with code '255'.
##[debug]task result: Failed
##[debug]Processed:
##vso[task.complete result=Failed;done=true;]

Here is my yaml:这是我的 yaml:

trigger:
- master

pool:
  vmImage: ubuntu-latest

variables:
  phpVersion: 7.4.3
steps:
- script: |
    composer self-update
    composer dump-autoload
    composer install --ignore-platform-reqs
  displayName: 'Install Composer'

- task: ArchiveFiles@2
  displayName: 'Archive files'
  inputs:
    rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
    includeRootFolder: false
    archiveType: zip
    archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
    replaceExistingArchive: true
- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

I have also used multiple commands for installing the composer我还使用了多个命令来安装作曲家

- script: composer install --no-interaction --prefer-dist

This is one of them please have a look at these这是其中之一,请看看这些

- script: |
composer self-update
composer dump-autoload
php -r 'file_put_contents("composer.json", json_encode(array_merge_recursive(json_decode(file_get_contents("composer.json"), true), json_decode("{\"extra\": {\"magento-force\": \"override\"}, \"autoload\": {\"psr-4\": {\"Magento\\\\Framework\\\\\": \"lib/internal/Magento/Framework/\", \"Magento\\\\Setup\\\\\": \"setup/src/Magento/Setup/\", \"Magento\\\\\": \"app/code/Magento/\"}, \"psr-0\": {\"\": [\"app/code/\"]},\"files\": [\"app/etc/NonComposerComponentRegistration.php\"]}}", true), json_decode("$(composerOverride)", true)), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));'
echo '{"_comment": "These credentials were set up using some dummy Magento account", "http-basic": {"repo.magento.com": {"username": "017dbe6c70294588566ae2f1ab07398bb", "password": "ee15f7e08a2d91787554dfc5e668da16c"}}}' > auth.json
composer install --ignore-platform-reqs
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

This script can be used to authenticate the user for Magento during azure devops pipeline此脚本可用于在 azure devops 管道期间对 Magento 的用户进行身份验证

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Azure DevOps 管道中将 xdebug.mode 设置为覆盖范围 - Set xdebug.mode to coverage in Azure DevOps pipeline 如何将 Composer 的 PHP 扩展添加到 Azure DevOps 管道 - How to add PHP extensions for Composer to Azure DevOps Pipeline Azure DevOps - 部署 Magento 2 - 请求实体代码太大 413 - Azure DevOps - Deploy Magento 2 - Request Entity too large code 413 Azure devops-Release Pipeline没有针对运行时堆栈的PHP 7.2的选项,但Azure App服务支持 - Azure devops - Release Pipeline has no option for PHP 7.2 for Runtime Stack, but the Azure App service does Azure Devops 管道 - PublishPipelineArtifact@1 - ##[错误]无法加载符号/硬链接文件 - Azure Devops Pipeline - PublishPipelineArtifact@1 - ##[error]Unable to load symbolic/hard linked file 适用于Magento的Azure上的MySQL应用程序 - MySQL in-app on Azure for Magento Apache Web 服务器上的 Azure DevOps 部署 - Azure DevOps Deployment on Apache web server Azure DevOps API - 无效的补丁文件 - Azure DevOps API - Invalid Patch Document 使用 Vuejs 和 Azure 管道实现 Azure Key Vault 的最佳方法 - best approch to implement Azure Key Vault with Vuejs and Azure Pipeline Azure 用于请求/跟踪功能或错误的 DevOps 自定义页面 - Azure DevOps Custom Page for Requesting / Tracking Features or Bugs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM