Skip to content

Commit

Permalink
combine functions for easier maintenance.
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondMouthaan committed Aug 22, 2019
1 parent aef7543 commit b2ab108
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 43 deletions.
38 changes: 19 additions & 19 deletions .docker/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ main() {
docker_push
;;
"manifest-list")
docker_manifest_list
docker_manifest_list $2
;;
*)
echo "none of above!"
Expand Down Expand Up @@ -105,32 +105,32 @@ docker_manifest_list() {

# Create and push manifest lists
echo "DOCKER MANIFEST: Create and Push docker manifest lists."
docker_manifest_list_version_rpi_python2 "-10"
docker_manifest_list_version_rpi_python3 "-10"
docker_manifest_list_version_rpi "-10"
docker_manifest_list_version_python2 "-10"
docker_manifest_list_version_python3 "-10"
docker_manifest_list_version "-10"
docker_manifest_list_version_rpi_python2 ${1}
docker_manifest_list_version_rpi_python3 ${1}
docker_manifest_list_version_rpi ${1}
docker_manifest_list_version_python2 ${1}
docker_manifest_list_version_python3 ${1}
docker_manifest_list_version ${1}

# Create manifest list testing or latest
case ${BUILD_VERSION} in
*"testing"*)
echo "DOCKER MANIFEST: Create and Push docker manifest list TESTING."
docker_manifest_list_testing_or_latest_rpi_python2 "-10" "testing"
docker_manifest_list_testing_or_latest_rpi_python3 "-10" "testing"
docker_manifest_list_testing_or_latest_rpi "-10" "testing"
docker_manifest_list_testing_or_latest_python2 "-10" "testing"
docker_manifest_list_testing_or_latest_python3 "-10" "testing"
docker_manifest_list_testing_or_latest "-10" "testing"
docker_manifest_list_testing_or_latest_rpi_python2 ${1} "testing"
docker_manifest_list_testing_or_latest_rpi_python3 ${1} "testing"
docker_manifest_list_testing_or_latest_rpi ${1} "testing"
docker_manifest_list_testing_or_latest_python2 ${1} "testing"
docker_manifest_list_testing_or_latest_python3 ${1} "testing"
docker_manifest_list_testing_or_latest ${1} "testing"
;;
*)
echo "DOCKER MANIFEST: Create and Push docker manifest list TESTING."
docker_manifest_list_testing_or_latest_rpi_python2 "-10" "latest"
docker_manifest_list_testing_or_latest_rpi_python3 "-10" "latest"
docker_manifest_list_testing_or_latest_rpi "-10" "latest"
docker_manifest_list_testing_or_latest_python2 "-10" "latest"
docker_manifest_list_testing_or_latest_python3 "-10" "latest"
docker_manifest_list_testing_or_latest "-10" "latest"
docker_manifest_list_testing_or_latest_rpi_python2 ${1} "latest"
docker_manifest_list_testing_or_latest_rpi_python3 ${1} "latest"
docker_manifest_list_testing_or_latest_rpi ${1} "latest"
docker_manifest_list_testing_or_latest_python2 ${1} "latest"
docker_manifest_list_testing_or_latest_python3 ${1} "latest"
docker_manifest_list_testing_or_latest ${1} "latest"
;;
esac

Expand Down
50 changes: 26 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ env:
- TARGET=raymondmm/node-red
- QEMU_VERSION=v4.0.0
matrix:
# ### Node JS 12 ###
# # No Python Images
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=0
## - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=0
#
# # Python 2 Images
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=2
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=2
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=2
## - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=2
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=2
#
# # Python 3 Images
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=3
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=3
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=3
## - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=3
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=3
### Node JS 12 ###
# No Python Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=0
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=0
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=0
# - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=0
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=0

# Python 2 Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=2
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=2
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=2
# - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=2
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=2

# Python 3 Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64 PYTHON_VERSION=3
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=3
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=3
# - DOCKER_FILE=Dockerfile.slim NODE_VERSION=12 OS=buster-slim QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=3
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=3

### Node JS 10 ###
# No Python Images
Expand Down Expand Up @@ -104,9 +104,11 @@ jobs:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

# Create and Push Docker Manifest Lists to Docker Hub
- echo "Create manifest list for all docker images."
- ./.docker/docker.sh docker_manifest_list_version_rpi_python2 "-10"
# - ./.docker/docker.sh manifest-list
- echo "Create manifest list for Node 12 docker images."
- ./.docker/docker.sh manifest-list "-12"

- echo "Create manifest list for Node 10 docker images."
- ./.docker/docker.sh manifest-list "-10"

# Docker Logout
- docker logout
Expand Down

0 comments on commit b2ab108

Please sign in to comment.