0
image: node:9.2.0

stages:
  - build

build:
  stage: build
  script: 
  - set NODE_ENV=production
  - npm install
  - npm run transpile
  - ls
  - cd dist-server
  - ls
  - node /bin/www
  #- npm run prod
  artifacts:
   expire_in: 1 day
   paths:
   - dist/

Above is my yaml file for ci can anyone share how to deploy this on the linux Azure Web App.

Apurv Mishra
  • 65
  • 1
  • 7

1 Answers1

1

There is no out-of-the-box solution to deploy to Azure using Gitlab.

What you can do in your Gitlab pipeline is the following proces:

  • Build docker container
  • Push docker container to Gitlab Container Registry (is included in your Gitlab Repository)
  • Run a curl command to trigger the Azure App Service webhook to update

You can host this Docker container in Azure (after creating the App Service, you can find the webhook url in the Deployment settings)

Michel
  • 309
  • 2
  • 17
  • That is sad. We want to work with gitlab ci and azure without docker – Vinit Khandelwal Jun 13 '22 at 05:27
  • 1
    I completely understand. You can try to use Azure Pipelines with your Gitlab repository. I haven't verified or tried this extension, but it seems promising: https://marketplace.visualstudio.com/items?itemName=onlyutkarsh.gitlab-integration – Michel Dec 15 '22 at 08:14