This file contains hidden or 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
<dependencies> | |
<!-- JUnit 5 Dependency for Testing --> | |
<dependency> | |
<groupId>org.junit.jupiter</groupId> | |
<artifactId>junit-jupiter-engine</artifactId> | |
<version>5.9.3</version> <!-- Use the latest stable version --> | |
<scope>test</scope> | |
</dependency> | |
<!-- Flyway Dependency --> |
This file contains hidden or 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
import java.io.File | |
import java.io.FileInputStream | |
import java.io.FileOutputStream | |
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.StandardCopyOption | |
import java.util.zip.ZipEntry | |
import java.util.zip.ZipInputStream | |
import java.util.zip.ZipOutputStream |
This file contains hidden or 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
// App.js | |
import React from "react"; | |
import { MsalProvider } from "@azure/msal-react"; | |
import msalInstance from "./msalConfig"; | |
import MainContent from "./MainContent"; | |
function App() { | |
return ( | |
<MsalProvider instance={msalInstance}> | |
<MainContent /> |
This file contains hidden or 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
keytool -genkeypair -alias myalias -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore mykeystore.p12 -validity 3650 | |
openssl pkcs12 -export -in cert.pem -inkey key.pem -out mykeystore.p12 -name myalias | |
# Copy the .p12 file into the Docker image | |
COPY mykeystore.p12 /path/to/keystore/mykeystore.p12 | |
This file contains hidden or 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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-install-plugin</artifactId> | |
<version>3.0.0-M1</version> | |
<executions> | |
<execution> | |
<id>install-jar</id> | |
<phase>validate</phase> |
This file contains hidden or 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
| **Feature** | **Service Principal** | **System-Assigned Managed Identity (SAMI)** | **User-Assigned Managed Identity (UAMI)** | | |
|---------------------------------|--------------------------------------------------------------------|----------------------------------------------------------------------|----------------------------------------------------------------------| | |
| **Creation** | Created manually in Azure AD by registering an application. | Automatically created and managed by Azure for a resource. | Created manually and assigned to resources as needed. | | |
| **Assignment to Resources** | Can be assigned roles or permissions to access resources. | Tied to a single Azure resource (VM, App Service, etc.). | Can be shared and assigned to multiple resources. | | |
| **Lifecycle** | Sta |
This file contains hidden or 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
stages: | |
- build | |
- deploy | |
# Variables for your project | |
variables: | |
IMAGE_NAME: "registry.example.com/your-project/your-image" # Docker image path | |
DOCKER_TAG: "${CI_COMMIT_SHA:0:8}" # Tag Docker image with commit SHA | |
# Build and push Docker image |
This file contains hidden or 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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>my-app</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<!-- Add repositories for dependencies --> |
This file contains hidden or 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
spec: | |
containers: | |
- name: your-app | |
image: your-app:dev | |
ports: | |
- containerPort: 8080 | |
env: | |
- name: SPRING_PROFILES_ACTIVE | |
value: "dev" |
This file contains hidden or 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
<!-- Spring Cloud Azure Starter --> | |
<dependency> | |
<groupId>com.azure.spring</groupId> | |
<artifactId>spring-cloud-azure-starter</artifactId> | |
</dependency> | |
<!-- Azure Blob Storage --> | |
<dependency> | |
<groupId>com.azure.spring</groupId> | |
<artifactId>spring-cloud-azure-starter-storage-blob</artifactId> |