generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Or…
…acle Database Cloud Services" workshop
- Loading branch information
1 parent
c119c18
commit 4d8e243
Showing
20 changed files
with
115 additions
and
6,015 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# 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: | ||
- main | ||
|
||
resources: | ||
- repo: self | ||
|
||
variables: | ||
|
||
# Container registry service connection established during pipeline creation | ||
dockerRegistryServiceConnection: 'ba554595-2da8-4cf6-88c4-a57c75966491' | ||
imageRepository: 'multicloudapp' | ||
containerRegistry: 'multicloud.azurecr.io' | ||
dockerfilePath: '**/Dockerfile' | ||
tag: '$(Build.BuildId)' | ||
imagePullSecret: 'multicloud2012b828-auth' | ||
|
||
# Agent VM image name | ||
vmImageName: 'ubuntu-latest' | ||
|
||
# Name of the new namespace being created to deploy the PR changes. | ||
k8sNamespaceForPR: 'review-app-$(System.PullRequest.PullRequestId)' | ||
|
||
stages: | ||
- stage: Build | ||
displayName: Build stage | ||
jobs: | ||
- job: Build | ||
displayName: Build | ||
pool: | ||
vmImage: $(vmImageName) | ||
steps: | ||
- task: JavaToolInstaller@0 | ||
inputs: | ||
versionSpec: '17' | ||
jdkArchitectureOption: 'x64' | ||
jdkSourceOption: 'PreInstalled' | ||
- task: Maven@4 | ||
inputs: | ||
mavenPomFile: 'pom.xml' | ||
publishJUnitResults: true | ||
testResultsFiles: '**/surefire-reports/TEST-*.xml' | ||
javaHomeOption: 'JDKVersion' | ||
mavenVersionOption: '1.17' | ||
mavenAuthenticateFeed: false | ||
effectivePomSkip: false | ||
sonarQubeRunAnalysis: false | ||
- task: Docker@2 | ||
displayName: Build and push an image to container registry | ||
inputs: | ||
command: buildAndPush | ||
repository: $(imageRepository) | ||
dockerfile: $(dockerfilePath) | ||
containerRegistry: $(dockerRegistryServiceConnection) | ||
tags: | | ||
$(tag) | ||
- upload: manifests | ||
artifact: manifests | ||
|
||
|
||
|
||
- stage: Deploy | ||
displayName: Deploy stage | ||
dependsOn: Build | ||
|
||
jobs: | ||
|
||
- deployment: Deploy | ||
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) | ||
displayName: Deploy | ||
pool: | ||
vmImage: $(vmImageName) | ||
environment: 'paulparkinsonazuredevopsoracledatabase-8684.default' | ||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- task: KubernetesManifest@0 | ||
displayName: Create imagePullSecret | ||
inputs: | ||
action: createSecret | ||
secretName: $(imagePullSecret) | ||
dockerRegistryEndpoint: $(dockerRegistryServiceConnection) | ||
|
||
- script: | | ||
yq eval '.spec.template.spec.containers[0].env += [{"name": "AZURE_LOG_LEVEL", "value": "verbose"}, {"name": "AZURE_CLIENT_ID", "value": "$(AZURE_CLIENT_ID)"}, {"name": "AZURE_CLIENT_SECRET", "value": "$(AZURE_CLIENT_SECRET)"}, {"name": "AZURE_TENANT_ID", "value": "$(AZURE_TENANT_ID)"}]' -i $(Pipeline.Workspace)/manifests/deployment.yml | ||
displayName: 'Add Environment Variable with yq' | ||
- task: KubernetesManifest@0 | ||
displayName: Deploy to Kubernetes cluster | ||
inputs: | ||
action: deploy | ||
manifests: | | ||
$(Pipeline.Workspace)/manifests/deployment.yml | ||
$(Pipeline.Workspace)/manifests/service.yml | ||
imagePullSecrets: | | ||
$(imagePullSecret) | ||
containers: | | ||
$(containerRegistry)/$(imageRepository):$(tag) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-647 KB
src/main/resources/static/OracleHealthAI-FlutterSpringBootStack copy.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.