Skip to content

Commit

Permalink
Stable builds (#160)
Browse files Browse the repository at this point in the history
* Pull image only if it exists

* Fix source path in stable builds

* Allow .ci to passthrough the docker context

* Image builds: improve comment and fix unwanted variable shadow

Co-authored-by: Pedro Figueiredo e Silva <[email protected]>
  • Loading branch information
GwendalRaoul and PFigs authored Jan 16, 2020
1 parent 8c6639b commit 5e96a9b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .ci/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function _build
echo "building ${_PATH}: ${IMAGE_NAME} (from: ${DOCKER_BASE})"

# to speed up builds
docker pull "${IMAGE_NAME}"
docker pull "${IMAGE_NAME}" || true

#shellcheck disable=SC2086
docker-compose -f "${_PATH}" \
Expand Down Expand Up @@ -127,13 +127,15 @@ function _main
LXGW_SERVICES_HASH="$(git log -n1 --pretty=%h)"
LXGW_C_MESH_API_HASH="$(git -C ${REPO_EDGE}/sink_service/c-mesh-api log -n1 --pretty=%h)"

# we want to copy the current changes (not what is in cr)
cp -vr "${GIT_REPO_FOLDER}/sink_service/c-mesh-api" "sink_service"
# The edge builds relies on the current gateway branch.
# The c-mesh-api must be pulled into the root level so that
# it is taken in use by the current build.
# If you would use the source from REPO_EDGE, you end up building
# the previous commit merged in master.
cp -vr "${REPO_EDGE}/sink_service/c-mesh-api" "sink_service"
_build "${DOCKERFILE_PATH}/dev/docker-compose.yml" "arm"
_build "${DOCKERFILE_PATH}/dev/docker-compose.yml" "x86"
fi


}


Expand Down
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


*.idea/*
*.ci/*
img/*

.clang-format
Expand All @@ -34,5 +33,4 @@ python_transport/dist/*
python_transport/docs/source/api/*
python_transport/docs/build/*


container/common/wm_transport_service.yml
2 changes: 1 addition & 1 deletion container/stable/arm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
VERSION: ${VERSION:-"1.2.0-rc.1"}
BUILD_DATE: ${BUILD_DATE:-"undefined"}
DOCKER_BASE: balenalib/raspberrypi3
SOURCE_PATH: .ci/repo_stable
SOURCE_PATH: .ci/_repo_stable
CROSS_BUILD_START_CMD: cross-build-start
CROSS_BUILD_END_CMD: cross-build-end
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway/stable.xml}
Expand Down
2 changes: 1 addition & 1 deletion container/stable/x86/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
VERSION: ${VERSION:-"1.2.0-rc.1"}
BUILD_DATE: ${BUILD_DATE:-"undefined"}
DOCKER_BASE: ubuntu:19.04
SOURCE_PATH: .ci/repo_stable
SOURCE_PATH: .ci/_repo_stable
CROSS_BUILD_START_CMD: ":"
CROSS_BUILD_END_CMD: ":"
GIT_MANIFEST_FILE: ${GIT_MANIFEST_FILE:-gateway/stable.xml}
Expand Down

0 comments on commit 5e96a9b

Please sign in to comment.