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
| FROM anapsix/alpine-java | |
| RUN mkdir -p /usr/springboot | |
| COPY ./target/api-0.0.1-SNAPSHOT.jar /usr/springboot | |
| WORKDIR /usr/springboot | |
| EXPOSE 8080 | |
| CMD ["java", "-jar", "api-0.0.1-SNAPSHOT.jar"] |
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
| pool: | |
| vmImage: 'ubuntu-latest' | |
| variables: | |
| imageName: spring-demo | |
| steps: | |
| - task: Maven@3 | |
| inputs: |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: {{ template "spring-demo.fullname" . }}-deployment | |
| spec: | |
| replicas: {{ .Values.scale }} | |
| selector: | |
| matchLabels: | |
| app: {{ template "spring-demo.fullname" . }}-spring | |
| template: |
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: {{ template "spring-demo.fullname" . }}-deployment | |
| spec: | |
| replicas: {{ .Values.scale }} | |
| selector: | |
| matchLabels: | |
| app: {{ template "spring-demo.fullname" . }}-spring | |
| template: |
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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: {{ template "spring-demo.fullname" . }}-env | |
| data: | |
| SPRING_PROFILE: {{ .Values.spring.profile }} | |
| MYSQL_USERNAME: {{ .Values.mysql.mysqlUser }} | |
| MYSQL_DATA_SOURCE: jdbc:mysql://{{ .Release.Name }}-mysql.{{ .Release.Namespace }}.svc.cluster.local:3306/{{ .Values.mysql.mysqlDatabase }} |
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
| - task: HelmDeploy@0 | |
| displayName: Helm package | |
| inputs: | |
| command: package | |
| chartPath: $(chartPath) | |
| destination: $(Build.ArtifactStagingDirectory) | |
| version: $(Build.BuildNumber) | |
| updatedependency: true | |
| - task: PublishBuildArtifacts@1 | |
| inputs: |
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
| /v1/dictionary/pages: | |
| get: | |
| tags: | |
| - 'Query Dictionary' | |
| responses: | |
| '200': | |
| description: 'Success' | |
| content: | |
| application/json: | |
| schema: |
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
| /v1/dictionary/page/{pageNo}: | |
| get: | |
| tags: | |
| - 'Query Dictionary' | |
| parameters: | |
| - name: pageNo | |
| in: path | |
| required: true | |
| description: Page number of the dictionary | |
| schema: |
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
| /v1/dictionary: | |
| get: | |
| tags: | |
| - 'Query Dictionary' | |
| parameters: | |
| - name: word | |
| in: query | |
| required: true | |
| description: Word to search | |
| schema: |
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
| class DictionaryTotalPageHandler { | |
| private val global = Startup | |
| @FunctionName("getNumberOfPagesInDictionary") | |
| fun run( | |
| @HttpTrigger(name = "req", methods = [HttpMethod.GET], route = "v1/dictionary/pages", authLevel = AuthorizationLevel.ANONYMOUS) request: HttpRequestMessage<Optional<String>>, | |
| context: ExecutionContext): HttpResponseMessage { | |
| context.logger.info("Processing get pages of dictionary") | |
| val result = DictionaryController().getNumberOfPagesInDictionary() |
OlderNewer