chore(build): allow full parallel build
This commit is contained in:
parent
09d376da08
commit
a30a9a29ed
4 changed files with 29 additions and 13 deletions
|
|
@ -31,8 +31,12 @@ function build_service() {
|
|||
}
|
||||
|
||||
function build_api(){
|
||||
cp -R ../backend ../_backend
|
||||
cd ../_backend
|
||||
destination="_backend"
|
||||
[[ $1 == "ee" ]] && {
|
||||
destination="_backend_ee"
|
||||
}
|
||||
cp -R ../backend ../${destination}
|
||||
cd ../${destination}
|
||||
# Copy enterprise code
|
||||
[[ $1 == "ee" ]] && {
|
||||
cp -r ../ee/backend/* ./
|
||||
|
|
@ -41,7 +45,7 @@ function build_api(){
|
|||
[[ $2 != "" ]] && {
|
||||
build_service $2
|
||||
cd ../backend
|
||||
rm -rf ../_backend
|
||||
rm -rf ../${destination}
|
||||
return
|
||||
}
|
||||
for image in $(ls cmd);
|
||||
|
|
@ -50,7 +54,7 @@ function build_api(){
|
|||
echo "::set-output name=image::${DOCKER_REPO:-'local'}/$image:${git_sha1}"
|
||||
done
|
||||
cd ../backend
|
||||
rm -rf ../_backend
|
||||
rm -rf ../${destination}
|
||||
echo "backend build completed"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,12 @@ check_prereq() {
|
|||
}
|
||||
|
||||
function build_api(){
|
||||
cp -R ../peers ../_peers
|
||||
cd ../_peers
|
||||
destination="_peers"
|
||||
[[ $1 == "ee" ]] && {
|
||||
destination="_peers_ee"
|
||||
}
|
||||
cp -R ../peers ../${destination}
|
||||
cd ../${destination}
|
||||
cp -R ../utilities/utils .
|
||||
# Copy enterprise code
|
||||
[[ $1 == "ee" ]] && {
|
||||
|
|
@ -24,7 +28,7 @@ function build_api(){
|
|||
}
|
||||
docker build -f ./Dockerfile -t ${DOCKER_REPO:-'local'}/peers:${git_sha1} .
|
||||
cd ../peers
|
||||
rm -rf ../_peers
|
||||
rm -rf ../${destination}
|
||||
[[ $PUSH_IMAGE -eq 1 ]] && {
|
||||
docker push ${DOCKER_REPO:-'local'}/peers:${git_sha1}
|
||||
docker tag ${DOCKER_REPO:-'local'}/peers:${git_sha1} ${DOCKER_REPO:-'local'}/peers:latest
|
||||
|
|
|
|||
|
|
@ -23,8 +23,12 @@ check_prereq() {
|
|||
}
|
||||
|
||||
function build_api(){
|
||||
cp -R ../sourcemap-reader ../_smr
|
||||
cd ../_smr
|
||||
destination="_smr"
|
||||
[[ $1 == "ee" ]] && {
|
||||
destination="_smr_ee"
|
||||
}
|
||||
cp -R ../sourcemap-reader ../${destination}
|
||||
cd ../${destination}
|
||||
cp -R ../utilities/utils .
|
||||
tag=""
|
||||
# Copy enterprise code
|
||||
|
|
@ -35,7 +39,7 @@ function build_api(){
|
|||
}
|
||||
docker build -f ./Dockerfile --build-arg envarg=$envarg -t ${DOCKER_REPO:-'local'}/${image_name}:${git_sha1} .
|
||||
cd ../sourcemap-reader
|
||||
rm -rf ../_smr
|
||||
rm -rf ../${destination}
|
||||
[[ $PUSH_IMAGE -eq 1 ]] && {
|
||||
docker push ${DOCKER_REPO:-'local'}/${image_name}:${git_sha1}
|
||||
docker tag ${DOCKER_REPO:-'local'}/${image_name}:${git_sha1} ${DOCKER_REPO:-'local'}/${image_name}:${tag}latest
|
||||
|
|
|
|||
|
|
@ -15,8 +15,12 @@ check_prereq() {
|
|||
}
|
||||
|
||||
function build_api(){
|
||||
cp -R ../utilities ../_utilities
|
||||
cd ../_utilities
|
||||
destination="_utilities"
|
||||
[[ $1 == "ee" ]] && {
|
||||
destination="_utilities_ee"
|
||||
}
|
||||
cp -R ../utilities ../${destination}
|
||||
cd ../${destination}
|
||||
|
||||
# Copy enterprise code
|
||||
[[ $1 == "ee" ]] && {
|
||||
|
|
@ -25,7 +29,7 @@ function build_api(){
|
|||
docker build -f ./Dockerfile -t ${DOCKER_REPO:-'local'}/assist:${git_sha1} .
|
||||
|
||||
cd ../utilities
|
||||
rm -rf ../_utilities
|
||||
rm -rf ../${destination}
|
||||
[[ $PUSH_IMAGE -eq 1 ]] && {
|
||||
docker push ${DOCKER_REPO:-'local'}/assist:${git_sha1}
|
||||
docker tag ${DOCKER_REPO:-'local'}/assist:${git_sha1} ${DOCKER_REPO:-'local'}/assist:latest
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue