Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipeline for dotnetcore app to deploy on azure

rajputj3_bv_com June 27, 2024

Can someone please help me with building dotnetcore api app and deploy on Azure?

This is what I have so far.

 

# Template .NET Core build # This template allows you to validate your .NET Core package. # The workflow allows running tests and code linting on the default branch. # To run your pipeline on a Windows machine, create a self-hosted Windows runner. # For instructions on setting up a Windows runner, see https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/ image: atlassian/default-image:2 pipelines: branches: master: - step: name: Build and Test image: mcr.microsoft.com/dotnet/core/sdk:3.1 caches: - dotnetcore script: - export PROJECT_NAME=Web/Web.csproj - dotnet restore - dotnet build $PROJECT_NAME - dotnet publish $PROJECT_NAME --configuration Release -r win-x64 --no-self-contained --output dist - pipe: snyk/snyk-scan:1.0.1 variables: SNYK_TOKEN: $SNYK_API_TOKEN LANGUAGE: "node" # Required unless SNYK_TEST_JSON_INPUT is set IMAGE_NAME: "" # Only required if LANGUAGE set to "docker" SNYK_BASE_IMAGE: "" # Custom base image CODE_INSIGHTS_RESULTS: "true" # Optional. SNYK_TEST_JSON_INPUT: "" # Optional. The filename or path of a JSON file containg the output from running a test with the Snyk CLI (with json output option). PROTECT: "" # Optional. DONT_BREAK_BUILD: "" # Optional. MONITOR: "true" # Optional. SEVERITY_THRESHOLD: "<low|medium|high|critical>" # Optional. ORGANIZATION: "" # Optional. PROJECT_FOLDER: "from-azure-devops" # Optional. TARGET_FILE: "" # Optional. EXTRA_ARGS: "all-projects" # Optional. DEBUG: "" # Optional. SNYK_API: "" # Optional. artifacts: - dist/** - step: name: Build zip script: - mv dist Web - zip -r Web.zip Web artifacts: - Web.zip # pass file to the next step - step: name: "Deploy to Test" deployment: test script: - pipe: atlassian/azure-web-apps-deploy:1.2.1 variables: AZURE_APP_ID: $AZURE_APP_ID AZURE_PASSWORD: $AZURE_PASSWORD AZURE_TENANT_ID: $AZURE_TENANT_ID AZURE_RESOURCE_GROUP: 'oneclick_002_test' AZURE_APP_NAME: 'web-oneclick-test-02' ZIP_FILE: 'Web.zipimage.png

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events