J'ai créé une définition de build dans vsts avec npm build, puis je copie le dossier de build à l'emplacement de dépôt.
Le pipeline de build fonctionne bien
Ensuite, j'ai créé la définition de la version et elle télécharge correctement les fichiers également:
2018-08-10T16:29:18.5241580Z Downloading artifact drop from: https://xx.visualstudio.com//_apis/resources/Containers/711976?itemPath=drop&isShallow=true&api-version=4.1-preview.4
2018-08-10T16:29:18.5252684Z Downloading drop/s/build/asset-manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\asset-manifest.json
2018-08-10T16:29:18.5253850Z Downloaded drop/s/build/asset-manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\asset-manifest.json
2018-08-10T16:29:18.5338277Z Downloading drop/s/build/favicon.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\favicon.png
2018-08-10T16:29:18.5338720Z Downloaded drop/s/build/favicon.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\favicon.png
2018-08-10T16:29:19.5191236Z Downloading drop/s/build/index.html to D:\a\r1\a\InnovationInABox-CI\drop\s\build\index.html
2018-08-10T16:29:19.5191520Z Downloaded drop/s/build/index.html to D:\a\r1\a\InnovationInABox-CI\drop\s\build\index.html
2018-08-10T16:29:19.5195415Z Downloading drop/s/build/manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\manifest.json
2018-08-10T16:29:19.5195775Z Downloaded drop/s/build/manifest.json to D:\a\r1\a\InnovationInABox-CI\drop\s\build\manifest.json
2018-08-10T16:29:19.5198280Z Downloading drop/s/build/service-worker.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\service-worker.js
2018-08-10T16:29:19.5198598Z Downloaded drop/s/build/service-worker.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\service-worker.js
2018-08-10T16:29:19.5704236Z Downloading drop/s/build/css/ionicons.min.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\css\ionicons.min.css
2018-08-10T16:29:19.5725284Z Downloaded drop/s/build/css/ionicons.min.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\css\ionicons.min.css
2018-08-10T16:29:19.5833575Z Downloading drop/s/build/iconfont/iconfont.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.svg
2018-08-10T16:29:19.5868415Z Downloading drop/s/build/fonts/ionicons.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.eot
2018-08-10T16:29:19.5901623Z Downloading drop/s/build/fonts/ionicons.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.svg
2018-08-10T16:29:19.5922072Z Downloaded drop/s/build/iconfont/iconfont.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.svg
2018-08-10T16:29:19.5967502Z Downloading drop/s/build/iconfont/iconfont.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.ttf
2018-08-10T16:29:19.5990580Z Downloaded drop/s/build/fonts/ionicons.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.eot
2018-08-10T16:29:19.6014585Z Downloading drop/s/build/iconfont/iconfont.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.eot
2018-08-10T16:29:19.6041800Z Downloaded drop/s/build/iconfont/iconfont.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.ttf
2018-08-10T16:29:19.6082471Z Downloading drop/s/build/fonts/ionicons.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.woff
2018-08-10T16:29:19.6355639Z Downloading drop/s/build/fonts/ionicons.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.ttf
2018-08-10T16:29:19.6356035Z Downloaded drop/s/build/fonts/ionicons.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.svg
2018-08-10T16:29:19.6609672Z Downloaded drop/s/build/iconfont/iconfont.eot to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.eot
2018-08-10T16:29:19.6614749Z Downloading drop/s/build/images/icons/icon-128x128.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-128x128.png
2018-08-10T16:29:19.6649976Z Downloaded drop/s/build/images/icons/icon-128x128.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-128x128.png
2018-08-10T16:29:19.6691472Z Downloaded drop/s/build/fonts/ionicons.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.woff
2018-08-10T16:29:19.6715380Z Downloading drop/s/build/images/icons/icon-144x144.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-144x144.png
2018-08-10T16:29:19.6721599Z Downloaded drop/s/build/fonts/ionicons.ttf to D:\a\r1\a\InnovationInABox-CI\drop\s\build\fonts\ionicons.ttf
2018-08-10T16:29:19.6730634Z Downloaded drop/s/build/images/icons/icon-144x144.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-144x144.png
2018-08-10T16:29:19.6925986Z Downloading drop/s/build/images/icons/icon-192x192.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-192x192.png
2018-08-10T16:29:19.6932585Z Downloaded drop/s/build/images/icons/icon-192x192.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-192x192.png
2018-08-10T16:29:19.7051155Z Downloading drop/s/build/images/icons/icon-384x384.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-384x384.png
2018-08-10T16:29:19.7068272Z Downloaded drop/s/build/images/icons/icon-384x384.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-384x384.png
2018-08-10T16:29:19.7128194Z Downloading drop/s/build/static/css/main.1338bde0.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\css\main.1338bde0.css
2018-08-10T16:29:19.7136566Z Downloading drop/s/build/images/icons/icon-72x72.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-72x72.png
2018-08-10T16:29:19.7139811Z Downloaded drop/s/build/images/icons/icon-72x72.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-72x72.png
2018-08-10T16:29:19.7210596Z Downloaded drop/s/build/static/css/main.1338bde0.css to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\css\main.1338bde0.css
2018-08-10T16:29:19.7331736Z Downloading drop/s/build/static/js/1.f6d2865a.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\1.f6d2865a.chunk.js
2018-08-10T16:29:19.7336557Z Downloaded drop/s/build/static/js/1.f6d2865a.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\1.f6d2865a.chunk.js
2018-08-10T16:29:19.7384208Z Downloading drop/s/build/static/js/2.194ad0ec.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\2.194ad0ec.chunk.js
2018-08-10T16:29:19.7388897Z Downloaded drop/s/build/static/js/2.194ad0ec.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\2.194ad0ec.chunk.js
2018-08-10T16:29:19.7493081Z Downloading drop/s/build/images/icons/icon-512x512.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-512x512.png
2018-08-10T16:29:19.7505060Z Downloaded drop/s/build/images/icons/icon-512x512.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-512x512.png
2018-08-10T16:29:19.7521694Z Downloading drop/s/build/images/icons/icon-96x96.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-96x96.png
2018-08-10T16:29:19.7524304Z Downloaded drop/s/build/images/icons/icon-96x96.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-96x96.png
2018-08-10T16:29:19.7531569Z Downloading drop/s/build/images/icons/icon-152x152.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-152x152.png
2018-08-10T16:29:19.7544109Z Downloading drop/s/build/iconfont/iconfont.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.woff
2018-08-10T16:29:19.7561190Z Downloaded drop/s/build/images/icons/icon-152x152.png to D:\a\r1\a\InnovationInABox-CI\drop\s\build\images\icons\icon-152x152.png
2018-08-10T16:29:19.7583131Z Downloaded drop/s/build/iconfont/iconfont.woff to D:\a\r1\a\InnovationInABox-CI\drop\s\build\iconfont\iconfont.woff
2018-08-10T16:29:19.7615220Z Downloading drop/s/build/static/js/4.0230ee4e.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\4.0230ee4e.chunk.js
2018-08-10T16:29:19.7620680Z Downloaded drop/s/build/static/js/4.0230ee4e.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\4.0230ee4e.chunk.js
2018-08-10T16:29:19.8139663Z Downloading drop/s/build/static/media/sign.adf5846b.jpg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\sign.adf5846b.jpg
2018-08-10T16:29:19.8209000Z Downloaded drop/s/build/static/media/sign.adf5846b.jpg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\sign.adf5846b.jpg
2018-08-10T16:29:19.8445251Z Downloading drop/s/build/static/media/uk.bc48afcc.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\uk.bc48afcc.svg
2018-08-10T16:29:19.8451360Z Downloaded drop/s/build/static/media/uk.bc48afcc.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\uk.bc48afcc.svg
2018-08-10T16:29:19.9315367Z Downloading drop/s/build/static/media/france.bcd389de.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\france.bcd389de.svg
2018-08-10T16:29:19.9316203Z Downloading drop/s/build/static/media/spain.6a9dc11f.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\spain.6a9dc11f.svg
2018-08-10T16:29:19.9316588Z Downloaded drop/s/build/static/media/france.bcd389de.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\france.bcd389de.svg
2018-08-10T16:29:19.9317287Z Downloaded drop/s/build/static/media/spain.6a9dc11f.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\spain.6a9dc11f.svg
2018-08-10T16:29:19.9430066Z Downloading drop/s/build/static/media/italy.604345b4.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\italy.604345b4.svg
2018-08-10T16:29:19.9430433Z Downloaded drop/s/build/static/media/italy.604345b4.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\italy.604345b4.svg
2018-08-10T16:29:20.0800791Z Downloading drop/s/build/static/js/3.06bbf4d1.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\3.06bbf4d1.chunk.js
2018-08-10T16:29:20.0801318Z Downloaded drop/s/build/static/js/3.06bbf4d1.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\3.06bbf4d1.chunk.js
2018-08-10T16:29:20.0962282Z Downloading drop/s/build/static/js/0.cdfd5bd5.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\0.cdfd5bd5.chunk.js
2018-08-10T16:29:20.0962659Z Downloaded drop/s/build/static/js/0.cdfd5bd5.chunk.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\0.cdfd5bd5.chunk.js
2018-08-10T16:29:20.1118659Z Downloading drop/s/build/static/js/main.03f3e98f.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\main.03f3e98f.js
2018-08-10T16:29:20.1541007Z Downloaded drop/s/build/static/js/main.03f3e98f.js to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\js\main.03f3e98f.js
2018-08-10T16:29:20.1566610Z Downloading drop/s/build/static/media/china.4e4d59b7.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\china.4e4d59b7.svg
2018-08-10T16:29:20.1569167Z Downloaded drop/s/build/static/media/china.4e4d59b7.svg to D:\a\r1\a\InnovationInABox-CI\drop\s\build\static\media\china.4e4d59b7.svg
2018-08-10T16:29:21.1552541Z Total Files: 35, Processed: 35, Skipped: 0, Failed: 0, Download time: 3.288 secs, Download size: 1.320MB
2018-08-10T16:29:21.1844380Z Successfully downloaded artifacts to D:\a\r1\a/InnovationInABox-CI
2018-08-10T16:29:21.1897267Z ##[section]Finishing: Download artifact - InnovationInABox-CI
Mais l'étape suivante consiste à déployer sur une application web Azure: mais je reçois cette erreur:
2018-08-10T16:29:21.8347426Z Got connection details for Azure App Service:'uiapp'
2018-08-10T16:29:24.0708659Z ##[error]Error: No package found with specified pattern: D:\a\r1\a\**\*.Zip
2018-08-10T16:29:26.8772211Z Successfully updated deployment History at https://xxx.scm.azurewebsites.net/api/deployments/81533918564296
2018-08-10T16:29:26.8855771Z ##[section]Finishing: Deploy Azure App Service
Comment puis-je copier tous ces fichiers du dossier de génération (qui ne se trouvent pas dans un fichier .Zip) vers Azure Webapp?
Dans mon cas (build .sln avec le projet c # d'Azure git), la build enregistrait le package dans le dossier D:\a\1\a\(au lieu de r1\a) et je n'étais pas capable de modifier les étapes de construction dans l'interface utilisateur, j'ai donc modifié le fichier Azure-pipelines.yml nouvellement ajouté et ajouté une tâche supplémentaire à la toute fin:
- task: PublishBuildArtifacts@1
Cela copie le package .Zip dans un emplacement de "dépôt" (r1/a) que le pipeline de versions attend.
Et maintenant, le Release Pipeline trouve le fichier dans le dossier r1/a.
Pour toute autre personne rencontrant ce problème à l'aide d'Azure DevOps, il est utile d'activer le mode de débogage. Pour votre version, définissez la variable de pipelineSystem.Debug
avec la valeur true
. Cela m'a donné cette sortie qui était beaucoup plus utile:
Maintenant, au moins, je sais que c'est sur ma cible VM et le chemin est probablement faux.
Vous ne pouvez malheureusement pas utiliser de caractères génériques pour les noms de dossier, uniquement pour les noms de fichiers. Si vous utilisez une tâche de construction "Copier des fichiers", vous pouvez mettre cette valeur dans "Dossier source":
D:\a\r1\a \
et cette valeur dans 'Contents':
**\*.Zip *: français
Ou vous pouvez mettre les répertoires de fichiers complets avec * .Zip. Bonne chance.