Skip to content

Commit

Permalink
Cleanup build files
Browse files Browse the repository at this point in the history
  • Loading branch information
eagafonovlge committed Feb 1, 2020
1 parent 7dc27cb commit cd0f0bf
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 59 deletions.
1 change: 0 additions & 1 deletion Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ pipeline {
env.GIT_COMMIT = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
env.SIM_ENVIRONMENTS = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Environments ${S3_DOWNLOAD_HOST} environment 1").trim()
env.SIM_VEHICLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Vehicles ${S3_DOWNLOAD_HOST} vehicle 1").trim()
env.SIM_CONTROLLABLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Controllables ${S3_DOWNLOAD_HOST} controllable 1").trim()
} // script

sh "rm -rf *.zip *.html *.xml"
Expand Down
7 changes: 0 additions & 7 deletions Jenkins/Jenkinsfile-Bundles
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pipeline {
env.GIT_COMMIT = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
env.SIM_ENVIRONMENTS = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Environments ${S3_DOWNLOAD_HOST} environment 0").trim()
env.SIM_VEHICLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Vehicles ${S3_DOWNLOAD_HOST} vehicle 0").trim()
env.SIM_CONTROLLABLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Controllables ${S3_DOWNLOAD_HOST} controllable 0").trim()
} // script

sh "rm -rf *.zip *.html *.xml"
Expand Down Expand Up @@ -127,9 +126,6 @@ pipeline {
not {
environment name: "SIM_VEHICLES", value: ""
}
not {
environment name: "SIM_CONTROLLABLES", value: ""
}
}
}
steps {
Expand All @@ -148,9 +144,6 @@ pipeline {
not {
environment name: "SIM_VEHICLES", value: ""
}
not {
environment name: "SIM_CONTROLLABLES", value: ""
}
}
}
steps {
Expand Down
4 changes: 0 additions & 4 deletions Jenkins/Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ pipeline {
env.FORCE_REBUILD = "0"
env.SIM_ENVIRONMENTS = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Environments ${S3_DOWNLOAD_HOST} environment 1").trim()
env.SIM_VEHICLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Vehicles ${S3_DOWNLOAD_HOST} vehicle 1").trim()
env.SIM_CONTROLLABLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Controllables ${S3_DOWNLOAD_HOST} controllable 1").trim()

} // script

sh "rm -rf *.zip *.html *.xml"
Expand Down Expand Up @@ -186,14 +184,12 @@ pipeline {
script {
env.SIM_ENVIRONMENTS = sh(returnStdout: true, script: "./get-assets.sh ../Assets/External/Environments ${S3_DOWNLOAD_HOST} environment 0").trim()
env.SIM_VEHICLES = sh(returnStdout: true, script: "./get-assets.sh ../Assets/External/Vehicles ${S3_DOWNLOAD_HOST} vehicle 0").trim()
env.SIM_CONTROLLABLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Controllables ${S3_DOWNLOAD_HOST} controllable 0").trim()
}
sh "UID=`id -u` docker-compose run --rm build-bundles"
sh "UID=`id -u` docker-compose run --rm upload-bundles"
script {
env.SIM_ENVIRONMENTS = sh(returnStdout: true, script: "./get-assets.sh ../Assets/External/Environments ${S3_DOWNLOAD_HOST} environment 1").trim()
env.SIM_VEHICLES = sh(returnStdout: true, script: "./get-assets.sh ../Assets/External/Vehicles ${S3_DOWNLOAD_HOST} vehicle 1").trim()
env.SIM_CONTROLLABLES = sh(returnStdout: true, script: "./Jenkins/get-assets.sh Assets/External/Controllables ${S3_DOWNLOAD_HOST} controllable 1").trim()
}
sh "UID=`id -u` docker-compose run --rm save-bundle-links"
}
Expand Down
13 changes: 2 additions & 11 deletions Jenkins/build-bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if [ ! -v UNITY_SERIAL ]; then
exit 1
fi

if [ -z ${SIM_ENVIRONMENTS+x} ] && [ -z ${SIM_VEHICLES+x} ] && [ -z ${SIM_CONTROLLABLES+x} ]; then
echo All environments,vehicles amd controllables are up to date!
if [ -z ${SIM_ENVIRONMENTS+x} ] && [ -z ${SIM_VEHICLES+x} ]; then
echo All environments and vehicles are up to date!
exit 0
fi

Expand Down Expand Up @@ -58,13 +58,6 @@ else
VEHICLES=
fi

if [ ! -z ${SIM_CONTROLLABLES+x} ]; then
getAssets "${SIM_CONTROLLABLES}"
CONTROLLABLES="-buildControllables ${ASSETS}"
else
CONTROLLABLESS=
fi

function finish
{
/opt/Unity/Editor/Unity \
Expand Down Expand Up @@ -99,6 +92,4 @@ fi
-buildBundles \
${ENVIRONMENTS} \
${VEHICLES} \
${CONTROLLABLES} \
${SENSORS} \
-logFile /dev/stdout
37 changes: 5 additions & 32 deletions Jenkins/build-simulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,10 @@ else
fi
fi

function getAssets()
{
ASSETS=
local DELIM=
while read -r LINE; do
local ITEMS=( ${LINE} )
local NAME="${ITEMS[1]}"
ASSETS="${ASSETS}${DELIM}${NAME}"
DELIM=","
done <<< "$1"
}

if [ ! -z ${SIM_CONTROLLABLES+x} ]; then
getAssets "${SIM_CONTROLLABLES}"
CONTROLLABLES="-buildControllables ${ASSETS}"
if [ ! -z ${SIMULATOR_CONTROLLABLES+x} ]; then
CONTROLLABLES="-buildBundles -buildControllables ${SIMULATOR_CONTROLLABLES}"
else
CONTROLLABLESS=
CONTROLLABLES=
fi

function finish
Expand Down Expand Up @@ -154,7 +141,8 @@ else

fi

echo "Building Player"
rm -Rf /mnt/AssetBundles/Controllables || true
mkdir -p /mnt/AssetBundles/Controllables || true

/opt/Unity/Editor/Unity ${DEVELOPMENT_BUILD} \
-serial ${UNITY_SERIAL} \
Expand All @@ -168,21 +156,6 @@ echo "Building Player"
-executeMethod Simulator.Editor.Build.Run \
-buildTarget ${BUILD_TARGET} \
-buildPlayer /tmp/${BUILD_OUTPUT} \
-logFile /dev/stdout

echo "Building bundled plugins"

/opt/Unity/Editor/Unity \
-serial ${UNITY_SERIAL} \
-username ${UNITY_USERNAME} \
-password ${UNITY_PASSWORD} \
-batchmode \
-force-glcore \
-silent-crashes \
-quit \
-projectPath /mnt \
-executeMethod Simulator.Editor.Build.Run \
-buildBundles \
${CONTROLLABLES} \
-logFile /dev/stdout

Expand Down
5 changes: 1 addition & 4 deletions Jenkins/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
- S3_DOWNLOAD_HOST
- SIM_ENVIRONMENTS
- SIM_VEHICLES
- SIM_CONTROLLABLES
- SIMULATOR_CONTROLLABLES
- CLOUD_URL
- JENKINS_BUILD_ID
- GIT_COMMIT
Expand Down Expand Up @@ -54,7 +54,6 @@ services:
environment:
- SIM_ENVIRONMENTS
- SIM_VEHICLES
- SIM_CONTROLLABLES
- S3_DOWNLOAD_HOST
- JENKINS_BUILD_ID
- GIT_COMMIT
Expand All @@ -81,7 +80,6 @@ services:
environment:
- SIM_ENVIRONMENTS
- SIM_VEHICLES
- SIM_CONTROLLABLES
- JENKINS_BUILD_ID
- GIT_COMMIT
- GIT_BRANCH
Expand All @@ -106,7 +104,6 @@ services:
environment:
- SIM_ENVIRONMENTS
- SIM_VEHICLES
- SIM_CONTROLLABLES
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- S3_BUCKET_NAME
Expand Down

0 comments on commit cd0f0bf

Please sign in to comment.