File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,13 +13,17 @@ DIST_DIR="${CURRENT_DIR}"/_dist
1313CODENAME=" ${CODENAME:? codename is required} "
1414# buildpack-dep image name
1515BUILDPACK_DEP_IMAGE=" ${DRYCC_REGISTRY} " /drycc/buildpack-dep:" ${CODENAME} "
16- # build buildpack-dep image
17- docker build --pull -f " ${CURRENT_DIR} " /Dockerfile --build-arg CODENAME=" ${CODENAME} " --build-arg DRYCC_REGISTRY=" ${DRYCC_REGISTRY} " . -t " ${BUILDPACK_DEP_IMAGE} "
16+
17+ function create-buildpack-dep {
18+ # build buildpack-dep image
19+ docker build --pull -f " ${CURRENT_DIR} " /Dockerfile --build-arg CODENAME=" ${CODENAME} " --build-arg DRYCC_REGISTRY=" ${DRYCC_REGISTRY} " . -t " ${BUILDPACK_DEP_IMAGE} "
20+ }
1821
1922function build {
2023 mkdir -p " $DIST_DIR "
2124 STACK_NAME=" ${1:? STACK_NAME is required} "
2225 stack_version=" ${2:? stack_version is required} "
26+ create-buildpack-dep
2327 docker run --rm \
2428 --privileged=true \
2529 --env STACK_DOWNLOAD_URL=" ${STACK_DOWNLOAD_URL:- } " \
@@ -35,6 +39,7 @@ function build {
3539
3640function upload {
3741 STACK_NAME=" ${1:? stack_name is required} "
42+ create-buildpack-dep
3843 docker run --rm \
3944 --env OSS_ENDPOINT=${OSS_ENDPOINT} \
4045 --env OSS_ACCESS_KEY_ID=${OSS_ACCESS_KEY_ID} \
You can’t perform that action at this time.
0 commit comments