Azurite icon indicating copy to clipboard operation
Azurite copied to clipboard

Azurite in Azure Devops Pipeline

Open asears opened this issue 6 years ago • 5 comments

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the Azurite was used?

3.9.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What's the Node.js version?

What problem was encountered?

Emulator & C# XUnit test is working locally. Test is failing in Devops pipeline. Looking for minimal example of installing & testing that azurite blob emulator is functional in the agent, with TLS 1.2 and oauth basic. Required for Azure SDK setup with DefaultCredential.

Steps to reproduce the issue?

With an Azure Devops classic pipeline, windows-2019 agent I do the following.

  1. download secure file pem (generated with mkcert locally on developer machine)
  2. download secure file pem key
  3. install azurite on the agent '''bash npm init -y npm install -g [email protected]>&1 printenv azurite --oauth basic --cert $(PEM_SECUREFILEPATH) --key $(KEY_SECUREFILEPATH) --loose -l /tmp --debug $(BUILD_ARTIFACTSTAGINGDIRECTORY)/debug.log &
4. minimal test task
```bash
curl 127.0.0.1:10000
curl localhost:10000
  1. minimal test result devops

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   229  100   229    0     0  19083      0 --:--:-- --:--:-- --:--:-- 20818Path or Http-Method does not match any emulated command.
Possible causes include
  - missing account name path parameter
  - Unsupported Http-Method on resource
  - Unsupported / Not implemented "comp" query parameter on resource
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   229  100   229    0     0  38166      0 --:--:-- --:--:-- --:--:-- 45800Path or Http-Method does not match any emulated command.
Possible causes include
  - missing account name path parameter
  - Unsupported Http-Method on resource
  - Unsupported / Not implemented "comp" query parameter on resource

Happy path local test.

curl 127.0.0.1:10000
curl: (52) Empty reply from server

Have you found a mitigation/solution?

No

asears avatar Nov 18 '20 21:11 asears

@asears From the current information, we don't find obvious hint for this issue. Would you please share the Azurite debug log, then we might can get more hints.

Besides that, we also test Azurite through Devops pipeline, you might can reference it: Config: https://github.com/Azure/Azurite/blob/master/azure-pipelines.yml Oauth test case: https://github.com/Azure/Azurite/blob/master/tests/blob/oauth.test.ts

blueww avatar Nov 19 '20 03:11 blueww

I got the azurite for windows section but pipeline still failed image

chatchathu199162 avatar Feb 11 '22 16:02 chatchathu199162

**this can be solved by following script in your pipeline.yml file under job steps **

- task: NodeTool@0 
      inputs:
         versionSpec: 13.x
    - script : npm install -g azurite
      displayName: Install Azurite
    - script : start /B azurite
      displayName: Start azurite

chatchathu199162 avatar Feb 11 '22 17:02 chatchathu199162

@chatchathu199162 Good to know the issue is resolve on your side. I will close this issue.

Feel free to contact us again if need any further assistance on Azurite.

blueww avatar Feb 14 '22 04:02 blueww

YesI will know if anything goes wrong , for now Pipeline is working perfectly. Thanks and regards Chathurani

On Mon, Feb 14, 2022 at 9:33 AM Wei Wei @.***> wrote:

Closed #639 https://github.com/Azure/Azurite/issues/639.

— Reply to this email directly, view it on GitHub https://github.com/Azure/Azurite/issues/639#event-6063837157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF73GVEQP67ASUX65MGOGLU3B5IPANCNFSM4T2R27QQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

chatchathu199162 avatar Feb 14 '22 04:02 chatchathu199162