Skip to content

Commit

Permalink
all together
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondMouthaan committed Aug 25, 2019
1 parent 80865fd commit 4e11bc2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 31 deletions.
14 changes: 7 additions & 7 deletions .docker/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,24 @@ function docker_manifest_list_version() {

function docker_manifest_list_testing_or_latest() {

if [[ ${BUILD_VERSION} == *"testing"* ]]; then export BUILD_VERSION="testing"; else export BUILD_VERSION="latest"; fi
if [[ ${BUILD_VERSION} == *"testing"* ]]; then export TAG_PREFIX="testing"; else export TAG_PREFIX="latest"; fi

if [[ ${1} == "" ]]; then export NODE_VERSION=""; else export NODE_VERSION="-${1}"; fi
if [[ ${2} == "default" ]]; then export TAG_SUFFIX=""; else export TAG_SUFFIX="-${2}"; fi

echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX}."
echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX}."

docker manifest create ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX} \
docker manifest create ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX} \
${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-amd64 \
${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v6 \
${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v7 \
${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm64v8

docker manifest annotate ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v6 --os=linux --arch=arm --variant=v6
docker manifest annotate ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v7 --os=linux --arch=arm --variant=v7
docker manifest annotate ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm64v8 --os=linux --arch=arm64 --variant=v8
docker manifest annotate ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v6 --os=linux --arch=arm --variant=v6
docker manifest annotate ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm32v7 --os=linux --arch=arm --variant=v7
docker manifest annotate ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX} ${TARGET}:${BUILD_VERSION}${NODE_VERSION:--10}${TAG_SUFFIX}-arm64v8 --os=linux --arch=arm64 --variant=v8

docker manifest push ${TARGET}:${BUILD_VERSION}${NODE_VERSION}${TAG_SUFFIX}
docker manifest push ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX}
}


Expand Down
73 changes: 49 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,7 @@ env:
- 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 DEVTOOLS=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v6 PYTHON_VERSION=0 DEVTOOLS=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=arm ARCH=arm32v7 PYTHON_VERSION=0 DEVTOOLS=0
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8 PYTHON_VERSION=0 DEVTOOLS=0

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

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

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

### Node JS 10 ####################################################################################################
# Default Images
Expand All @@ -63,6 +39,32 @@ env:
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=10 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=arm ARCH=arm32v7
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=10 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8


### Node JS 12 ####################################################################################################
# Default Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=0 TAG_SUFFIX=default OS=alpine QEMU_ARCH=x86_64 ARCH=amd64
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=0 TAG_SUFFIX=default OS=alpine QEMU_ARCH=arm ARCH=arm32v6
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=0 TAG_SUFFIX=default OS=alpine QEMU_ARCH=arm ARCH=arm32v7
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=0 TAG_SUFFIX=default OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8

# Minimal Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=0 DEVTOOLS=0 TAG_SUFFIX=minimal OS=alpine QEMU_ARCH=x86_64 ARCH=amd64
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=0 DEVTOOLS=0 TAG_SUFFIX=minimal OS=alpine QEMU_ARCH=arm ARCH=arm32v6
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=0 DEVTOOLS=0 TAG_SUFFIX=minimal OS=alpine QEMU_ARCH=arm ARCH=arm32v7
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=0 DEVTOOLS=0 TAG_SUFFIX=minimal OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8

# # Devtools Images
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=1 TAG_SUFFIX=devtools OS=alpine QEMU_ARCH=x86_64 ARCH=amd64
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=1 TAG_SUFFIX=devtools OS=alpine QEMU_ARCH=arm ARCH=arm32v6
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=1 TAG_SUFFIX=devtools OS=alpine QEMU_ARCH=arm ARCH=arm32v7
- DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=3 DEVTOOLS=1 TAG_SUFFIX=devtools OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8

# # Python 2 Images
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=x86_64 ARCH=amd64
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=arm ARCH=arm32v6
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=arm ARCH=arm32v7
# - DOCKER_FILE=Dockerfile.alpine NODE_VERSION=12 PYTHON_VERSION=2 DEVTOOLS=0 TAG_SUFFIX=python2 OS=alpine QEMU_ARCH=aarch64 ARCH=arm64v8

before_install:
- ./.docker/docker.sh prepare

Expand Down Expand Up @@ -116,6 +118,28 @@ jobs:
# Docker Login
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

# Node 12 ################################################################################
# Create and push manifest list `version` for devtools
- ./.docker/docker.sh manifest-list-version "12" "devtools"

# Create and push manifest list 'latest' or 'testing' for devtools
- ./.docker/docker.sh manifest-list-testing-or-latest "12" "devtools"

# Create and push manifest list `version` for minimal
- ./.docker/docker.sh manifest-list-version "12" "minimal"

# Create and push manifest list 'latest' or 'testing' for minimal
- ./.docker/docker.sh manifest-list-testing-or-latest "12" "minimal"

# Create and push manifest list `version` for default
- ./.docker/docker.sh manifest-list-version "12" "default"

# Create and push manifest list 'latest' or 'testing' for default
- ./.docker/docker.sh manifest-list-testing-or-latest "12" "default"

# End Node 12 ############################################################################

# Node 10 ################################################################################
# Create and push manifest list `version` for devtools
- ./.docker/docker.sh manifest-list-version "" "devtools"
- ./.docker/docker.sh manifest-list-version "10" "devtools"
Expand All @@ -139,6 +163,7 @@ jobs:
# Create and push manifest list 'latest' or 'testing' for default
- ./.docker/docker.sh manifest-list-testing-or-latest "" "default"
- ./.docker/docker.sh manifest-list-testing-or-latest "10" "default"
# End Node 10 ############################################################################

# Docker Logout
- docker logout
Expand Down

0 comments on commit 4e11bc2

Please sign in to comment.