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 com.azure.core.credential.AzureKeyCredential; | |
| import com.azure.search.documents.SearchClient; | |
| import com.azure.search.documents.SearchClientBuilder; | |
| import com.azure.search.documents.models.IndexDocumentsBatch; | |
| import com.azure.search.documents.models.IndexDocumentsResult; | |
| import com.azure.search.documents.models.IndexDocumentsAction; | |
| import com.azure.search.documents.models.IndexActionType; | |
| import org.springframework.stereotype.Service; | |
| import java.util.Arrays; |
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
| package com.example.service; | |
| import com.azure.search.documents.SearchClient; | |
| import com.azure.search.documents.models.SearchOptions; | |
| import com.azure.search.documents.models.SearchResult; | |
| import org.springframework.cache.annotation.Cacheable; | |
| import org.springframework.stereotype.Service; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
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 org.springframework.web.bind.annotation.GetMapping; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.RestController; | |
| @RestController | |
| @RequestMapping("/test") | |
| public class TestController { | |
| @GetMapping("/thread") | |
| public String checkThread() { |
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
| # get release name from k8s | |
| kubectl get secrets -n <namespace> | grep sh.helm.release | |
| deploy: | |
| stage: deploy | |
| script: | |
| - export IMAGE_TAG=${CI_COMMIT_TAG:-latest} # Fallback to 'latest' if not set | |
| - sed -i "s/tag:.*/tag: ${IMAGE_TAG}/" values.yaml | |
| - helm upgrade --install my-release my-chart -f values.yaml |
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 org.springframework.core.convert.converter.Converter; | |
| import org.springframework.security.core.GrantedAuthority; | |
| import org.springframework.security.core.authority.SimpleGrantedAuthority; | |
| import org.springframework.security.oauth2.jwt.Jwt; | |
| import org.springframework.security.oauth2.server.resource.authentication.JwtGrantedAuthoritiesConverter; | |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.List; |
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.FileOutputStream; | |
| import java.io.InputStream; | |
| import java.security.KeyFactory; | |
| import java.security.KeyStore; | |
| import java.security.PrivateKey; | |
| import java.security.cert.Certificate; | |
| import java.security.cert.CertificateFactory; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.util.Base64; |
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
| test: | |
| script: | |
| # Find the initdb binary in any subdirectory of /tmp/embedded-pg/ and give it execute permissions | |
| - find /tmp/embedded-pg/ -type f -name "initdb" -exec chmod +x {} \; | |
| - find /tmp/embedded-pg/ -type f -name "initdb" -exec chmod +x {} \; | |
| - ls -l $(find /tmp/embedded-pg/ -type f -name "initdb") | |
| - apt-get update && apt-get install -y sudo | |
| - sudo -u testuser mvn test -Djavax.net.debug=ssl,handshake | |
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 /> |