From 51eaaf48e591c3de82fbf97431fe12ff522c0b65 Mon Sep 17 00:00:00 2001 From: sampath kumar <134235018+SampaTH991207@users.noreply.github.com> Date: Sun, 13 Jul 2025 15:05:40 -0400 Subject: [PATCH 1/2] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..27a798ad83 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script' From df292deb9e87125b8f4036bdc7897f351e30d246 Mon Sep 17 00:00:00 2001 From: sampath kumar <134235018+SampaTH991207@users.noreply.github.com> Date: Sun, 13 Jul 2025 15:10:18 -0400 Subject: [PATCH 2/2] Update azure-pipelines.yml Added th steps to compile --- azure-pipelines.yml | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 27a798ad83..928ab10dfb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,19 +1,44 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - trigger: - master pool: vmImage: ubuntu-latest +variables: + imageName: myapp + tag: $(Build.BuildId) + steps: +# 1. Print a hello message - script: echo Hello, world! displayName: 'Run a one-line script' +# 2. Placeholder for build commands (adjust based on language) - script: | - echo Add other tasks to build, test, and deploy your project. - echo See https://aka.ms/yaml - displayName: 'Run a multi-line script' + echo "Building your project..." + # Uncomment and modify the following depending on your tech stack + # npm install + # npm run build + # dotnet build + displayName: 'Build the app' + +# 3. Build the Docker image +- task: Docker@2 + displayName: 'Build Docker image' + inputs: + command: build + Dockerfile: '**/Dockerfile' + tags: | + $(tag) + repository: $(imageName) + +# 4. Push Docker image to Docker Hub or ACR +- task: Docker@2 + displayName: 'Push Docker image' + inputs: + command: push + repository: $(imageName) + tags: | + $(tag) + containerRegistry: 'myContainerRegistryServiceConnection' # Replace with your DockerHub or ACR connection name +