celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-401: Small refactoring for generating the Dockerfile for deployments
Date Tue, 21 Feb 2017 07:58:06 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 257b774bc -> 7e71402c7


CELIX-401: Small refactoring for generating the Dockerfile for deployments


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/7e71402c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/7e71402c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/7e71402c

Branch: refs/heads/develop
Commit: 7e71402c75761173cdffdf0bb47c6fa113c03379
Parents: 257b774
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Tue Feb 21 08:57:30 2017 +0100
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Tue Feb 21 08:57:30 2017 +0100

----------------------------------------------------------------------
 cmake/cmake_celix/DockerPackaging.cmake | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/7e71402c/cmake/cmake_celix/DockerPackaging.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/DockerPackaging.cmake b/cmake/cmake_celix/DockerPackaging.cmake
index 1f839d9..7881062 100644
--- a/cmake/cmake_celix/DockerPackaging.cmake
+++ b/cmake/cmake_celix/DockerPackaging.cmake
@@ -64,11 +64,10 @@ function(deploy_docker)
     set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_DOCKERFILE_WORK_DIR" "${DOCKER_WORK_DIR}")
#workdir in docker image, should also contain the config.properties
     set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_DOCKERFILE_INSTRUCTIONS" "")
#list of additional instructions
 
-    set(STAGE1 "${CMAKE_CURRENT_BINARY_DIR}/${DEPLOY_TARGET}-Dockerfile-stage1")
     set(DOCKERFILE "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_LOCATION>/Dockerfile")
 
     file(GENERATE
-            OUTPUT "${STAGE1}"
+            OUTPUT "${DOCKERFILE}"
             CONTENT "# Dockerfile for inaetics/celix-node-agent-service
 FROM $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_FROM>
 
@@ -76,18 +75,13 @@ FROM $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_FROM>
 ENV IMAGE_NAME $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_IMAGE_NAME>
 
 #add bundles, properties and set workdir
-COPY $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_BUNDLES>, > $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_BUNDLES_DIR>
+COPY bundles/*.zip $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_BUNDLES_DIR>
 COPY config.properties $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_WORK_DIR>
 WORKDIR $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_WORK_DIR>
 $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_INSTRUCTIONS>,
 >
 ")
 
-    file(GENERATE
-        OUTPUT "${DOCKERFILE}"
-        INPUT "${STAGE1}"
-    )
-
     get_target_property(DEPS dockerfiles "DOCKER_FILES_DEPS")
     list(APPEND DEPS "${DOCKERFILE}")
     set_target_properties(dockerfiles PROPERTIES "DOCKER_FILES_DEPS" "${DEPS}")
@@ -114,4 +108,4 @@ function(deploy_docker_check)
             Add the COPY to the add_deploy command for '${DEPLOY_TARGET}'
         ")
     endif()
-endfunction()
\ No newline at end of file
+endfunction()


Mime
View raw message