Skip to main content

Azure CICD using DevOps

Create Azure subscription and use it in pipelines and releases

Environment:Azure Cloud
Server URL:https://management.azure.com/
Scope Level: Subscription
Subscription Id:
Subscription Name:
Service Principal Id:
Credential: service principal key
Tenant ID:
Service Connection Name: subscription_name
Security: Grant access permission to all pipelines

Step1: Create Pipeline -  azure-pipelines.yml - ensure auto trigger

# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java

trigger:
master
releases/*


pool:
  vmImageubuntu-latest

steps:
taskMaven@3
  inputs:
    mavenPomFile'pom.xml'
    mavenOptions'-Xmx3072m'
    javaHomeOption'JDKVersion'
    jdkVersionOption'1.8'
    jdkArchitectureOption'x64'
    publishJUnitResultstrue
    testResultsFiles'**/surefire-reports/TEST-*.xml'
    goals'package'
    options'package -Dmaven.test.skip'
taskPublishPipelineArtifact@1
  inputs:
    targetPath'$(Pipeline.Workspace)'
    artifactType'pipeline'
    artifactName'drop'

Step2: Create Release - ensure auto trigger is enabled
steps: - task: AzureRmWebAppDeployment@4 displayName: 'Azure App Service Deploy: <app_name>' inputs: azureSubscription: '<subscription_name>' appType: webAppLinux WebAppName: <app_name> packageForLinux: '$(System.DefaultWorkingDirectory)/_<app_name_in_gitub>/drop/s/target' RuntimeStack: 'JAVA|8-jre8' AppSettings: '-WEBSITE_TIME_ZONE "Pacific Standard Time"'

Step3: Restart App Server

steps: - task: AzureAppServiceManage@0 displayName: 'Restart Azure App Service: <app_name>' inputs: azureSubscription: '<subscription_name>' Action: 'Restart Azure App Service' WebAppName: <app_name>

Push code to master Repository and the check if the jar /drop/s/target (build - Continuous Integration) and then release
should trigger and move to Azure app server (Continous Deployment)

Build Pipeline >> Release

Comments

Popular posts from this blog

LookML

  What Is LookML? LookML is a language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. Looker uses a model written in LookML to construct SQL queries against a particular database. LookML Projects A LookML Project is a collection of model, view, and dashboard files that are typically version controlled together via a Git repository. The model files contain information about which tables to use, and how they should be joined together. The view files contain information about how to calculate information about each table (or across multiple tables if the joins permit them). LookML separates structure from content, so the query structure (how tables are joined) is independent of the query content (the columns to access, derived fields, aggregate functions to compute, and filtering expressions to apply). LookML separates content of queries from structure of queries SQL Queries Generated by Looker For data analysts, LookML fosters DRY style...

Data Warehouse 101 - Part 2

  Traditional Data Warehouse Concepts A  data warehouse  is any system that collates data from a wide range of sources within an organization. Data warehouses are used as centralized data repositories for analytical and reporting purposes. A traditional data warehouse is located on-site at your offices. You purchase the hardware, the server rooms and hire the staff to run it. They are also called on-premises, on-prem or (grammatically incorrect) on-premise data warehouses. Facts, Dimensions, and Measures The core building blocks of information in a data warehouse are facts, dimensions, and measures. A  fact  is the part of your data that indicates a specific occurrence or transaction. For example, if your business sells flowers, some facts you would see in your data warehouse are: Sold 30 roses in-store for $19.99 Ordered 500 new flower pots from China for $1500 Paid salary of cashier for this month $1000 Several numbers can describe each fact, and we call these...

A Deep Dive Into Google BigQuery Architecture

Introduction Google’s BigQuery is an enterprise-grade cloud-native data warehouse. BigQuery was first launched as a service in 2010 with general availability in November 2011. Since inception, BigQuery has evolved into a more economical and fully-managed data warehouse which can run blazing fast interactive and ad-hoc queries on datasets of petabyte-scale. In addition, BigQuery now integrates with a variety of Google Cloud Platform (GCP) services and third-party tools which makes it more useful. BigQuery is serverless, or more precisely data warehouse as a service. There are no servers to manage or database software to install. BigQuery service manages underlying software as well as infrastructure including scalability and high-availability. The pricing model is quite simple - for every 1 TB of data processed you pay $5. BigQuery exposes simple client interface which enables users to run interactive queries. Overall, you don’t need to know much about underlying BigQuery architecture or...