Skip to content

Commit

Permalink
Add docker buildx in the .travis.yml to release multi-arch sqshq Dock…
Browse files Browse the repository at this point in the history
…er images.

Signed off-by: odidev <[email protected]>
  • Loading branch information
odidev authored and Ubuntu committed Jul 17, 2023
1 parent 6bb2cf9 commit 0ab9026
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 39 deletions.
43 changes: 13 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,66 +17,49 @@ env:
after_success:
- bash <(curl -s https://codecov.io/bash)
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name builder --driver docker-container --use
- docker buildx inspect --bootstrap

#TAG
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`

# CONFIG SERVICE
- export CONFIG=sqshq/piggymetrics-config
- docker build -t $CONFIG:$COMMIT ./config
- docker tag $CONFIG:$COMMIT $CONFIG:$TAG
- docker push $CONFIG
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $CONFIG:$TAG ./config

# REGISTRY
- export REGISTRY=sqshq/piggymetrics-registry
- docker build -t $REGISTRY:$COMMIT ./registry
- docker tag $REGISTRY:$COMMIT $REGISTRY:$TAG
- docker push $REGISTRY
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $REGISTRY:$TAG ./registry

# GATEWAY
- export GATEWAY=sqshq/piggymetrics-gateway
- docker build -t $GATEWAY:$COMMIT ./gateway
- docker tag $GATEWAY:$COMMIT $GATEWAY:$TAG
- docker push $GATEWAY
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $GATEWAY:$TAG ./gateway

# AUTH SERVICE
- export AUTH_SERVICE=sqshq/piggymetrics-auth-service
- docker build -t $AUTH_SERVICE:$COMMIT ./auth-service
- docker tag $AUTH_SERVICE:$COMMIT $AUTH_SERVICE:$TAG
- docker push $AUTH_SERVICE
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $AUTH_SERVICE:$TAG ./auth-service

# ACCOUNT SERVICE
- export ACCOUNT_SERVICE=sqshq/piggymetrics-account-service
- docker build -t $ACCOUNT_SERVICE:$COMMIT ./account-service
- docker tag $ACCOUNT_SERVICE:$COMMIT $ACCOUNT_SERVICE:$TAG
- docker push $ACCOUNT_SERVICE
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $ACCOUNT_SERVICE:$TAG ./account-service

# STATISTICS SERVICE
- export STATISTICS_SERVICE=sqshq/piggymetrics-statistics-service
- docker build -t $STATISTICS_SERVICE:$COMMIT ./statistics-service
- docker tag $STATISTICS_SERVICE:$COMMIT $STATISTICS_SERVICE:$TAG
- docker push $STATISTICS_SERVICE
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $STATISTICS_SERVICE:$TAG ./statistics-service

# NOTIFICATION_SERVICE
- export NOTIFICATION_SERVICE=sqshq/piggymetrics-notification-service
- docker build -t $NOTIFICATION_SERVICE:$COMMIT ./notification-service
- docker tag $NOTIFICATION_SERVICE:$COMMIT $NOTIFICATION_SERVICE:$TAG
- docker push $NOTIFICATION_SERVICE
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $NOTIFICATION_SERVICE:$TAG ./notification-service

# MONITORING
- export MONITORING=sqshq/piggymetrics-monitoring
- docker build -t $MONITORING:$COMMIT ./monitoring
- docker tag $MONITORING:$COMMIT $MONITORING:$TAG
- docker push $MONITORING
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $MONITORING:$TAG ./monitoring

# TURBINE STREAM SERVICE
- export TURBINE=sqshq/piggymetrics-turbine-stream-service
- docker build -t $TURBINE:$COMMIT ./turbine-stream-service
- docker tag $TURBINE:$COMMIT $TURBINE:$TAG
- docker push $TURBINE
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $TURBINE:$TAG ./turbine-stream-service

# MONGO DB
- export MONGO_DB=sqshq/piggymetrics-mongodb
- docker build -t $MONGO_DB:$COMMIT ./mongodb
- docker tag $MONGO_DB:$COMMIT $MONGO_DB:$TAG
- docker push $MONGO_DB
- docker buildx build --no-cache --platform linux/amd64,linux/arm64 --push -t $MONGO_DB:$TAG ./mongodb
2 changes: 1 addition & 1 deletion account-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/account-service.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion auth-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/auth-service.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion config/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/config.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/gateway.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion monitoring/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/monitoring.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion notification-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/notification-service.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion registry/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/registry.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion statistics-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Alexander Lukyanchikov <[email protected]>

ADD ./target/statistics-service.jar /app/
Expand Down
2 changes: 1 addition & 1 deletion turbine-stream-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM java:8-jre
FROM amazoncorretto:8u372-al2023-jre
MAINTAINER Chi Dov <[email protected]>

ADD ./target/turbine-stream-service.jar /app/
Expand Down

0 comments on commit 0ab9026

Please sign in to comment.