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
Stream<BigDecimal> bigDecimalNumber = | |
Stream.of(BigDecimal.ZERO, BigDecimal.ONE, BigDecimal.TEN); | |
BigDecimal result = bigDecimalNumber.reduce(BigDecimal.ZERO, BigDecimal::add); | |
assertEquals(11, result); |
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
Stream<Integer> intNumbers = Stream.of(5, 1, 100); | |
int result = intNumbers.reduce(0, Integer::sum); | |
assertEquals(106, result); |
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
List<Double> doubleNumbers = Arrays.asList(23.48, 52.26, 13.5); | |
double result = doubleNumbers.stream() | |
.mapToDouble(Double::doubleValue) | |
.sum(); | |
assertEquals(89.24, result, .1); |
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
deployment: | |
parameters: | |
microservice_name: | |
type: string | |
machine: true | |
steps: | |
- checkout | |
- kubernetes/install | |
- aws-eks/update-kubeconfig-with-authenticator: | |
cluster-name: "flask-starter-cluster" |
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
- run: | |
name: Build Docker image | |
command: | | |
cd << parameters.microservice_name >> | |
docker-compose build server | |
docker tag <<parameters.tag_name>>:latest "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"/<< parameters.microservice_name>>:dev | |
- aws-cli/install | |
- aws-cli/setup | |
- run: | |
name: Create ECR repository |
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
deploy-dev: | |
machine: true | |
steps: | |
- checkout | |
- run: | |
name: Build and push Docker image to development | |
command: | | |
docker build -t fabripautasso/node-starter-v2 . | |
docker pull wagoodman/dive | |
docker run --rm -it \ |
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
# Start with Ubuntu Trusty | |
FROM phusion/baseimage:0.10.0 AS BuildImage | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
curl \ | |
&& curl -sL https://deb.nodesource.com/setup_10.x | bash \ |
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
# Start with Ubuntu Trusty | |
FROM phusion/baseimage:0.10.0 AS BuildImage | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
curl \ | |
&& curl -sL https://deb.nodesource.com/setup_10.x | bash \ |
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
# Start with Ubuntu Trusty | |
FROM phusion/baseimage:0.10.0 | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] | |
RUN apt-get update | |
RUN apt-get -y install wget | |
RUN apt-get -y install curl | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ include "node-starter.fullname" . }} | |
labels: | |
{{- include "node-starter.labels" . | nindent 4 }} | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.port }} |
NewerOlder