Azure App Service Deployment through CURL

sujith reddy komma 76 Reputation points
2020-09-28T12:49:51.913+00:00

Hi,

I want to to deploy my JavaScript App Services as a zip file through curl command

before that i want to zip the file using powershell

Compress-Archive -Path Common/* -DestinationPath common-sujith1.zip

i did the zip file and then ran the curl command with the Deployment Credentials proided in the properties

i checked the Deployment Logs with this, it always fails.

"id": "b2d684272d5a4b0abfa0ed8f6d5a193a",
"status": 4,
"status_text": "",
"author_email": "N/A",
"author": "N/A",
"deployer": "Push-Deployer",
"message": "Created via a push deployment",
"progress": "",
"received_time": "2020-09-28T11:59:16.3888447Z",
"start_time": "2020-09-28T11:59:16.4597202Z",
"end_time": "2020-09-28T11:59:55.7793448Z",
"last_success_end_time": "2020-09-28T11:59:55.7793448Z",
"complete": true,
"active": false,
"is_temp": false,
"is_readonly": true,

Then i made the zip file by right clicking on the contents and send it to a zip file, Then i ran the curl command with that zip file it is successful(files size is just 100 KB less when i did it through powershell)

CAn you please help me with this?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,048 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ryan Hill 26,241 Reputation points Microsoft Employee
    2020-09-29T06:07:19.14+00:00

    Hi @sujith reddy komma ,

    The log snippet you posted doesn't indicate an error of the deployment but a status that the deployment has occurred. What you want you to do is click on the log URL followed by deploy.cmd log file to see what exactly took place after zipping up your deployment.

    28956-image.png

    With regards to your javascript application deployment, the logs should be able to reveal which npm commands, if needed, were ran against your javascript application.

    Your powershell command appears to be in order but it's worth checking for any differences between right+clicking and the contents of common-sujith1.zip. Remember, the contents of common-sujith1.zip should be the root folder of the app itself and not contained in a parent folder.

    0 comments No comments

  2. sujith reddy komma 76 Reputation points
    2020-09-29T19:52:56.253+00:00

    Hi Ryan

    Thanks for the answer.

    I just checked my deployment file

    [
    {
    "log_time": "2020-09-29T19:12:03.0026083Z",
    "id": "0976dcd7-51a5-4254-8a90-6417ab85f9f6",
    "message": "Updating submodules.",
    "type": 0,
    "details_url": null
    },
    {
    "log_time": "2020-09-29T19:12:03.0287668Z",
    "id": "516c780d-5393-41c1-a719-cb9956caa83c",
    "message": "Preparing deployment for commit id 'b20cee4df3'.",
    "type": 0,
    "details_url": null
    },
    {
    "log_time": "2020-09-29T19:12:03.0952114Z",
    "id": "3715723c-be43-429b-9879-29664dfe6312",
    "message": "Repository path is /tmp/zipdeploy/extracted",
    "type": 0,
    "details_url": null
    },
    {
    "log_time": "2020-09-29T19:12:03.1194585Z",
    "id": "9d0ae73e-a1be-4f79-ad03-bd6f9a5c8674",
    "message": "Running oryx build...",
    "type": 2,
    "details_url": "https://XXXX.scm.dev001./api/deployments/b20cee4df3e64a7d90967c1d41c1ddf1/log/9d0ae73e-a1be-4f79-ad03-bd6f9a5c8674"
    }
    ]

    when i click on the Log, it would be like below

    found 4 vulnerabilities (3 low, 1 high)

    rsync: recv_generator: failed to stat "/home/site/wwwroot/controllers\xxx.js": Invalid argument (22)

    Can you help me with the above

    i checked the zip file and it seems to have all the contents in it