Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nishkarshraj/az-dev-community-demo
Azure DevOps Pipelines with GitHub as VCS
https://github.com/nishkarshraj/az-dev-community-demo
azure-devops github
Last synced: 29 days ago
JSON representation
Azure DevOps Pipelines with GitHub as VCS
- Host: GitHub
- URL: https://github.com/nishkarshraj/az-dev-community-demo
- Owner: NishkarshRaj
- License: mit
- Created: 2021-07-24T13:44:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:56:27.000Z (about 1 year ago)
- Last Synced: 2024-11-10T02:15:55.845Z (3 months ago)
- Topics: azure-devops, github
- Language: Java
- Homepage: https://www.youtube.com/watch?v=BtwQX4UP9BE
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure DevOps Pipelines with GitHub as VCS
## Agenda
1. Create a Springboot Application with Maven and Java
2. Host the Springboot Application on GitHub
3. Deploy your packaged file to Azure Feeds
4. Create a Maven Release for your project
5. Setup Build Pipeline for Maven Release
6. Setup Release Pipeline in Azure DevOps for deployment to K8s### 1. Create a Springboot Application with Maven and Java
https://github.com/nishkarshRaj/maven-using-cmd
### 2. Host the Springboot Application on GitHub
```
git init
git remote add origin ""
git config --local user.name ""
git config --local user.email ""git add ""
git commit -m ""
git push -u origin [branch name]
```### 3. Deploy your packaged file to Azure Feeds
```xml
NishkarshRaj
https://pkgs.dev.azure.com/NishkarshRaj/_packaging/NishkarshRaj/maven/v1
true
true
NishkarshRaj
https://pkgs.dev.azure.com/NishkarshRaj/_packaging/NishkarshRaj/maven/v1
true
true
``````
mvn clean install
mvn deploy
```### 4. Create a Maven Release for your project
```xml
scm:git:https://github.com/NishkarshRaj/az-dev-community-demo
nish-1.0.0
org.apache.maven.plugins
maven-release-plugin
3.0.0-M4
NishkarshRaj
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
org.springframework.boot
spring-boot-maven-plugin
``````
git checkout master
git config --local user.name ""
git config --local user.email ""
mvn release:prepare --batch-mode
mvn release:perform
```### 5. Setup Build Pipeline for Maven Release
### 6. Setup Release Pipeline in Azure DevOps for deployment to K8s
```
docker build -t [] -f [] .
docker tag [] []az login --use-device-code
az acr login -n azdevdocker push []
kubectl apply -f k8s.yaml
``````
ACR_NAME=[]
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
az ad sp create-for-rbac --scopes $ACR_REGISTRY_ID --role acrpullkubectl create secret docker-registry cred \
--namespace default \
--docker-server=azdev.azurecr.io \
--docker-username=$SP_APP_ID \
--docker-password=$SP_PASSWD
```