Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all changes #2

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c202cb7
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
3562267
Update 01-docker-build-and-push-to-acr-pipeline-01.yml for Azure Pipe…
shyam1986 Aug 11, 2021
cd097e5
Update 01-docker-build-and-push-to-acr-pipeline-01.yml for Azure Pipe…
shyam1986 Aug 11, 2021
dcda9f6
Update 01-docker-build-and-push-to-acr-pipeline-01.yml for Azure Pipe…
shyam1986 Aug 11, 2021
8f0ffa7
Update 01-docker-build-and-push-to-acr-pipeline-01.yml for Azure Pipe…
shyam1986 Aug 11, 2021
7776562
Update 01-docker-build-and-push-to-acr-pipeline-01.yml for Azure Pipe…
shyam1986 Aug 11, 2021
7cacd84
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
7abde29
Delete 01-docker-build-and-push-to-acr-pipeline-01.yml
shyam1986 Aug 11, 2021
91a25f5
Delete 01-docker-build-and-push-to-acr-pipeline.yml
shyam1986 Aug 11, 2021
0e1ab1b
Delete 02-docker-build-push-to-acs-deploy-to-aks-pipeline.yml
shyam1986 Aug 11, 2021
d691a0b
Delete 022-Docker-BuildPushToACR-DeployToAKSCluster.yml
shyam1986 Aug 11, 2021
898b71c
Delete 03-custom1-pipeline-buildandpush-to-acr-and-publish-artifacts.yml
shyam1986 Aug 11, 2021
cca5b32
Delete 04-custom2-pipeline-build-from-scratch.yml
shyam1986 Aug 11, 2021
936955d
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
5d657c6
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
f591c7c
Delete deployment.yml
shyam1986 Aug 11, 2021
0f7db58
Delete service.yml
shyam1986 Aug 11, 2021
9f30ff5
Delete azure-pipelines-aks.yml
shyam1986 Aug 11, 2021
6c5946e
Update azure-pipelines-aks.yml for Azure Pipelines
shyam1986 Aug 11, 2021
0934cb0
Delete azure-pipelines-aks.yml
shyam1986 Aug 11, 2021
cd0ccd4
Delete 02-docker-build-push-to-acs-deploy-to-aks-pipeline.yml
shyam1986 Aug 11, 2021
c26dbad
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
4fbaf22
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
fc2c8c2
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
65b4700
Update azure-pipelines.yml for Azure Pipelines
shyam1986 Aug 11, 2021
2812f76
Update azure-pipelines.yml for Azure Pipelines
shyam1986 Aug 11, 2021
db8bd9b
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
5fb2c93
Update 03-custom1-BuildPushToACR-Publish-k8s-manifests-to-AzurePipeli…
shyam1986 Aug 11, 2021
e203bdf
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
f44df35
Update 01-Deployment-and-LoadBalancer-Service.yml
shyam1986 Aug 11, 2021
a04afe5
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
93377fd
Update azure-pipelines-5testing.yml for Azure Pipelines
shyam1986 Aug 11, 2021
c08b85f
Update azure-pipelines-5testing.yml for Azure Pipelines
shyam1986 Aug 11, 2021
7719d7b
Update 01-Deployment-and-LoadBalancer-Service.yml
shyam1986 Aug 11, 2021
2a72290
Set up CI with Azure Pipelines
shyam1986 Aug 11, 2021
e9e576b
html changes
Aug 12, 2021
a6998cd
df
Aug 12, 2021
3ed2d93
ok
Aug 12, 2021
6dc9d5c
go
Aug 12, 2021
2124dd0
final-test
Aug 12, 2021
1488882
testing
Aug 12, 2021
0a6f625
pipeline-rename-testing
Aug 12, 2021
dce748c
new change
Aug 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Docker
# Build and push an image to Azure Container Registry
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- master

Expand All @@ -10,23 +6,23 @@ resources:

variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '4ee05316-45b2-4c65-9574-a13237e77eb4'
imageRepository: 'app1/app1nginx'
containerRegistry: 'aksdevopsacr.azurecr.io'
dockerRegistryServiceConnection: 'd6ae712d-d9d8-4b2e-ac07-5015f00d75d2'
imageRepository: 'scutom1'
containerRegistry: 'cgaksdevopsacr.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'

# Agent VM image name
vmImageName: 'ubuntu-latest'
vmImageName: 'Linuxtesting'

stages:
- stage: Build
displayName: Build and push stage
jobs:
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
name: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
Expand All @@ -37,3 +33,17 @@ stages:
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)

#publuc artificat
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/kube-manifests'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'kube-manifests'
publishLocation: 'Container'

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
trigger:
- master

variables:
tag: '$(Build.BuildId)'

stages:
- stage: Build
displayName: Build-Stage
jobs:
- job: Build
displayName: Build job
pool:
name: Linuxtesting
steps:
- task: Docker@2
inputs:
containerRegistry: 'acr-shrikant'
repository: 'myappshrikantrepo'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
tags: |
$(tag)
$(Build.SourceVersion)

- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/kube-manifests'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'kube-manifests'
publishLocation: 'Container'




1 change: 1 addition & 0 deletions azure-devops-github-acr-aks-app1
Submodule azure-devops-github-acr-aks-app1 added at 2a7229
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ stages:
- job: Build
displayName: Build Job
pool:
vmImage: 'ubuntu-latest'
name: Linuxtesting
steps:
# Task-1: Build Docker Image and push to Azure Container Registry ACR
- task: Docker@2
inputs:
containerRegistry: 'manual-aksdevopsacr-svc'
containerRegistry: 'acr-shrikant'
repository: 'custom2aksnginxapp1'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Deploy to Azure Kubernetes Service
# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- master

Expand All @@ -11,25 +7,25 @@ resources:
variables:

# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: '569fbdc4-eae7-48e7-a717-a723d2ae03ce'
imageRepository: 'app1nginxaks'
containerRegistry: 'aksdevopsacr.azurecr.io'
dockerRegistryServiceConnection: '2ae50189-233f-4cbb-ba92-0b18a0a77842'
imageRepository: 'shyamazuredevopsgithubacraksapp'
containerRegistry: 'cgaksdevopsacr.azurecr.io'
dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildId)'
imagePullSecret: 'aksdevopsacr21364011-auth'
imagePullSecret: 'cgaksdevopsacr11054010-auth'

# Agent VM image name
vmImageName: 'ubuntu-latest'
vmImageName: 'Linuxtesting'


stages:
- stage: Build
displayName: Build stage
jobs:
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
name: Linuxtesting
steps:
- task: Docker@2
displayName: Build and push an image to container registry
Expand All @@ -40,7 +36,7 @@ stages:
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)

- upload: manifests
artifact: manifests

Expand All @@ -52,8 +48,8 @@ stages:
- deployment: Deploy
displayName: Deploy
pool:
vmImage: $(vmImageName)
environment: 'stacksimplifyazuredevopsgithubacraksapp1.default'
name: Linuxtesting
environment: 'shyam1986azuredevopsgithubacraksapp1-1113.aksnamspace'
strategy:
runOnce:
deploy:
Expand All @@ -64,7 +60,7 @@ stages:
action: createSecret
secretName: $(imagePullSecret)
dockerRegistryEndpoint: $(dockerRegistryServiceConnection)

- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
# Docker
# Build and push an image to Azure Container Registry
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
# Stages
# Stage-1:
# Task-1: Build Docker Image and push to Azure Container Registry ACR
# Task-2: Copy kube-manifest files to Build Artifact Directory
# Task-3: Publish build articats to Azure Pipelines
# Pipeline Hierarchial Flow: Stages -> Stage -> Jobs -> Job -> Steps -> Task1, Task2, Task3

trigger:
- master

resources:
- repo: self

# Variables
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: 'cf9f2bef-6696-4dea-9fa3-580d9b5cab9d'
imageRepository: 'custom1aksnginxapp1'
containerRegistry: 'aksdevopsacr.azurecr.io'
dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
tag: '$(Build.BuildId)'

# Agent VM image name
vmImageName: 'ubuntu-latest'

stages:
# Build Stage
- stage: Build
displayName: Build and push stage
jobs:
displayName: Build Stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
displayName: Build Job
pool:
name: Linuxtesting
steps:
# Task-1: Build Docker Image and push to Azure Container Registry ACR
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
containerRegistry: 'acr-shrikant'
repository: 'custom2aksnginxapp1'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
tags: |
$(tag)
$(Build.SourceVersion)
## Publish Artifacts pipeline code in addition to Build and Push
- bash: echo Contents in System Default Working Directory; ls -R $(System.DefaultWorkingDirectory)
- bash: echo Before copying Contents in Build Artifact Directory; ls -R $(Build.ArtifactStagingDirectory)
Expand Down
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html>
<body style="background-color:rgb(212, 240, 234);">
<h1>Welcome to Stack Simplify - Azure DevOps App1 - V13</h1>
<body style="New Demobackground-color:rgb(212, 240, 234);">
<h1>Welcome to CG - Azure DevOps App1 - V14</h1>
<h2>Azure DevOps Demo App1</h2>
<h2>Application Version: V13</h2>
<h2>Application Version-final-test1: V14</h2>
</body>
</html>
-
2 changes: 1 addition & 1 deletion kube-manifests/01-Deployment-and-LoadBalancer-Service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: app1-nginx
image: aksdevopsacr.azurecr.io/custom2aksnginxapp1
image: cgaksdevopsacr.azurecr.io/custom2aksnginxapp1
ports:
- containerPort: 80
---
Expand Down
10 changes: 5 additions & 5 deletions manifests/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion : apps/v1
kind: Deployment
metadata:
name: app1nginxaks
name: shyamazuredevopsgithubacraksapp
spec:
replicas: 1
selector:
matchLabels:
app: app1nginxaks
app: shyamazuredevopsgithubacraksapp
template:
metadata:
labels:
app: app1nginxaks
app: shyamazuredevopsgithubacraksapp
spec:
containers:
- name: app1nginxaks
image: aksdevopsacr.azurecr.io/app1nginxaks
- name: shyamazuredevopsgithubacraksapp
image: cgaksdevopsacr.azurecr.io/shyamazuredevopsgithubacraksapp
ports:
- containerPort: 80
4 changes: 2 additions & 2 deletions manifests/service.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: app1nginxaks
name: shyamazuredevopsgithubacraksapp
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: app1nginxaks
app: shyamazuredevopsgithubacraksapp