Skip to content

Commit

Permalink
Jenkins: remove some unnecessary changes
Browse files Browse the repository at this point in the history
* now when Unity doesn't segfault when Library is empty we can remove some work arounds
  which seemd to fix some of the segfault causes

* we still cannot use Xvfb, it still segfaults even when repeating build 3 times and
  keeping Library between the builds

* use latest hdrp/unityci/editor docker image built in:
  https://auto-jenkins.lgsvl.net/view/docker/job/unityci-docker-image/30/
  • Loading branch information
shr-project committed Sep 17, 2021
1 parent 0a65f08 commit a3e0f95
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Jenkins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ FROM ${EDITOR_DOCKER_IMAGE}
# - is needed for libvulkan1 to work
# - otherwise vulkaninfo fails with:
# vulkan-tools-1.2.131.1+dfsg1/vulkaninfo/vulkaninfo.h:371: failed with ERROR_INCOMPATIBLE_DRIVER)
# - but including this in the image breaks Unity trying to use Vulkan as well
# osslsigncode:
# - is needed by build-simulator.sh script when building for windows:
# Jenkins/build-simulator.sh: osslsigncode sign
Expand All @@ -37,13 +36,15 @@ RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
libvulkan1 \
mesa-vulkan-drivers \
osslsigncode \
uuid-runtime \
vulkan-tools \
zip \
&& apt-get clean

# Don't use Xvfg and call Unity directly (we run it on servers with Xorg running and DISPLAY set), show /opt/unity/image-info-lgsvl.source content before calling Unity
RUN sed -i 's#xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"#echo "Running Unity Editor from docker image:" \&\& cat /opt/unity/image-info-lgsvl.source \&\& /opt/unity/Editor/Unity "$@"#g' /usr/bin/unity-editor
# Don't use Xvfb and call Unity directly (we run it on servers with Xorg running and DISPLAY set), show /opt/unity/image-info-lgsvl.source content before calling Unity
RUN sed -i 's#xvfb-run -ae /dev/stdout "$UNITY_PATH/Editor/Unity" -batchmode "$@"#echo "Running Unity Editor from docker image:" \&\& cat /opt/unity/image-info-lgsvl.source \&\& echo "/opt/unity/Editor/Unity \"$@\"" \&\& /opt/unity/Editor/Unity "$@"#g' /usr/bin/unity-editor

# NB. This is overwritten when launched by docker with --gpus=N option
# or Kubernetes with resources.limits.nvidia.com/gpu=N XXX <= confirm not overridden by K8s if not specified.
Expand Down
2 changes: 1 addition & 1 deletion Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pipeline {
UNITY_SERIAL = credentials("UNITY_SERIAL")
UNITY_VERSION = "2020.3.3f1"
UNITY_DOCKER_IMAGE = "${GITLAB_HOST}:4567/hdrp/unityci/editor-lgsvl"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-5-gbb48ea6__build__28"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-4-g07a8336__build__30"
CODE_SIGNING_PASSWORD = credentials("LGSVL_CODE_SIGNING_PASSWORD")
PYTHONUNBUFFERED = "1"
DISPLAY = ":0"
Expand Down
2 changes: 1 addition & 1 deletion Jenkins/Jenkinsfile-Bundles
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
UNITY_SERIAL = credentials("UNITY_SERIAL")
UNITY_VERSION = "2020.3.3f1"
UNITY_DOCKER_IMAGE = "${GITLAB_HOST}:4567/hdrp/unityci/editor-lgsvl"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-5-gbb48ea6__build__28"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-4-g07a8336__build__30"
PYTHONUNBUFFERED = "1"
DISPLAY = ":0"
JENKINS_BUILD_ID = "${BUILD_ID}"
Expand Down
2 changes: 1 addition & 1 deletion Jenkins/Jenkinsfile-Bundles-Release
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
UNITY_SERIAL = credentials("UNITY_SERIAL")
UNITY_VERSION = "2020.3.3f1"
UNITY_DOCKER_IMAGE = "${GITLAB_HOST}:4567/hdrp/unityci/editor-lgsvl"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-5-gbb48ea6__build__28"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-4-g07a8336__build__30"
PYTHONUNBUFFERED = "1"
DISPLAY = ":0"
JENKINS_BUILD_ID = "${BUILD_ID}"
Expand Down
2 changes: 1 addition & 1 deletion Jenkins/Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pipeline {
UNITY_SERIAL = credentials("UNITY_SERIAL")
UNITY_VERSION = "2020.3.3f1"
UNITY_DOCKER_IMAGE = "${GITLAB_HOST}:4567/hdrp/unityci/editor-lgsvl"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-5-gbb48ea6__build__28"
UNITY_DOCKER_IMAGE_TAG = "2020.3.3f1-v0.15-4-g07a8336__build__30"
CODE_SIGNING_PASSWORD = credentials("LGSVL_CODE_SIGNING_PASSWORD")
PYTHONUNBUFFERED = "1"
DISPLAY = ":0"
Expand Down
4 changes: 2 additions & 2 deletions Jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export UNITY_PASSWORD=...
export UNITY_SERIAL=...
export UNITY_VERSION="2020.3.3f1"
export UNITY_DOCKER_IMAGE="hdrp/unityci/editor-lgsvl"
export UNITY_DOCKER_IMAGE_TAG="2020.3.3f1-v0.15-5-gbb48ea6__build__28"
export UNITY_DOCKER_IMAGE_TAG="2020.3.3f1-v0.15-4-g07a8336__build__30"
export PYTHONUNBUFFERED=1
export UID
export CODE_SIGNING_FILE=/dev/urandom
Expand Down Expand Up @@ -69,7 +69,7 @@ To setup Pipeline CI job on jenkins following global environment variables are r
* `UNITY_VERSION` - Version of Unity, ex: `2020.3.3f1`
* `GITLAB_HOST` - hostname of GitLab instance, ex: `gitlab.example.com`
* `UNITY_DOCKER_IMAGE` - name of Docker image, ex: `gitlab.example.com:4567/hdrp/simulator`
* `UNITY_DOCKER_IMAGE_TAG` - tag of Docker image with Unity, ex: `2020.3.3f1-v0.15-5-gbb48ea6__build__28`
* `UNITY_DOCKER_IMAGE_TAG` - tag of Docker image with Unity, ex: `2020.3.3f1-v0.15-4-g07a8336__build__30`
* `SIMULATOR_ENVIRONMENTS` - comma separated list of environment bundles to build, ex: `CubeTown,SanFrancisco`
* `SIMULATOR_VEHICLES` - comma separated list of vehicle bundles to build, ex: `Car1,Car2`
* `S3_BUCKET_NAME` - AWS S3 bucket name to where upload bundles
Expand Down
4 changes: 2 additions & 2 deletions Jenkins/build-bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function build_bundle {
echo "Building bundle (${BUNDLE}/${BUNDLES}) $*"
if [ ! -d .external-assets/$1/$2 ] ; then
echo "ERROR: Bundle source doesn't exist in .external-assets/$1/$2"
exit 1
else
mkdir -p Assets/External/$1
mv .external-assets/$1/$2 Assets/External/$1
Expand All @@ -119,7 +118,6 @@ function build_bundle {
mv Assets/External/$1/$2 .external-assets/$1/$2
if [ ! -f AssetBundles/$1/*_$2 ] ; then
echo "ERROR: Bundle $1 $2 wasn't created in AssetBundles/$1/*_$2"
exit 1
else
echo "INFO: Bundle $1 $2 succeeded to build"
fi
Expand Down Expand Up @@ -204,6 +202,8 @@ OK=0
# maybe drop -e before the next section, because "|| true" is needed after
# each grep which doesn't match anything (including grep -c), and also after
# expr 0 + 0, which prints 0, but returns 1 as return status
echo
echo
echo "Build bundles summary:"
for assetType in Environments Vehicles Sensors Bridges; do
if [ -f unity-build-bundles-${assetType}.log ] ; then
Expand Down

0 comments on commit a3e0f95

Please sign in to comment.