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.

  • Thanks Jason for replying, can we deploy this from gitlab? and the steps to add in yaml for deploying it? – Apurv Mishra Oct 30 '20 at 04:13
  • Pls check this article. https://about.gitlab.com/blog/2020/07/09/integrating-azure-devops-scm-and-gitlab/ – Jason Nov 02 '20 at 06:55

1 Answers1

0

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
  • 169
  • 1
  • 17