Browse code at this revision
Parent(s): [98d6d5]
changed | bundles-src/jobex-fe/code/src/package.json |
changed | bundles-src/jobex-fe/component-builder-script.sh |
changed | scripts/build-register-deploy.sh |
changed | scripts/config |
changed | readme.md |
copied | scripts/service-builder.sh -> scripts/jobex-builder.sh |
scripts/service-builder.sh to scripts/jobex-builder.sh
--- a/scripts/service-builder.sh +++ b/scripts/jobex-builder.sh @@ -624,7 +624,7 @@ echoError "File $componentBundlePath not found" fi - cp ${componentBundlePath} ${PROJECT_DIR}/${BUNDLES_FOLDER}/. + cp ${componentBundlePath} ${PROJECT_DIR}/${BUNDLES_FOLDER}/. 2> /dev/null bundleName=$(basename "$componentBundlePath") if [ ! -f ${PROJECT_DIR}/${BUNDLES_FOLDER}/${bundleName} ]; then @@ -834,6 +834,35 @@ echoCheck "bundleDeployment: ${FILE_NAME} created" } +function bundleResources() { + + if [ ${componentSource} == "git" ]; + then + cd ${PROJECT_DIR}/${COMPONENTS_FOLDER}/${componentName} + else + cd ${componentFolder} + fi + + resourcesFolder=${PWD}/resources + + if [ ! -d ${deploymentFolder} ]; then + echoError "bundleResources: Deployment folder $deploymentFolder not found." + fi + + FILE_NAME="resources.zip" + + # remove silently old resources + rm ${PROJECT_DIR}/${BUNDLES_FOLDER}/manifests/resources.zip 2> /dev/null + + cd ${resourcesFolder} + zip -qur ${PROJECT_DIR}/${BUNDLES_FOLDER}/manifests/${FILE_NAME} . + + if [ ! -f ${PROJECT_DIR}/${BUNDLES_FOLDER}/manifests/${FILE_NAME} ]; then + echoError "bundleResources: Deployment zip bundle not created" + fi + + echoCheck "bundleResources: ${FILE_NAME} created" +} function bundleDomain() { @@ -929,12 +958,11 @@ then if [ ${ONE_BUNDLE} == "true" ]; then - echoSection "Creating one single bundle" - echoInfo "var ONE_BUNDLE set to true" + echoSection "Packing all into a bundle" cd ${PROJECT_DIR}/${BUNDLES_FOLDER} - zip -q ../service-bundle ./*.zip ./manifests/*.zip + zip -q ../jobex-bundle ./*.zip ./manifests/*.zip cd .. - echoCheck "Bundle service_bundle.zip created in $PWD" + echoCheck "Bundle jobex_bundle.zip created in $PWD" fi fi } @@ -980,6 +1008,9 @@ echoSection "Creating deployment bundle" bundleDeployment +echoSection "Creating resources bundle" +bundleResources + #echoSection "Creating domain bundle" #bundleDomain