Skip to content

Commit

Permalink
Build NPCs only if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
eagafonovlge committed Jun 2, 2020
1 parent d14ac6f commit eda3f59
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ pipeline {
}

stage("Checkout NPCs") {
when {
not {
anyOf {
environment name: "SIMULATOR_NPCS_REPOS", value: ""
environment name: "SIMULATOR_NPCS", value: ""
}
}
}
steps {
script {
def npcs = env.SIMULATOR_NPCS_REPOS.split(',')
Expand Down
10 changes: 10 additions & 0 deletions Jenkins/Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ pipeline {
FORCE_REBUILD = "${FORCE_REBUILD}"
SIMULATOR_ENVIRONMENTS = "${SIMULATOR_ENVIRONMENTS_RELEASE}"
SIMULATOR_SENSORS = "${SIMULATOR_SENSORS_RELEASE}"
SIMULATOR_NPCS_REPOS = "${SIMULATOR_NPCS_REPOS_RELEASE}"
SIMULATOR_NPCS = "${SIMULATOR_NPCS_RELEASE}"
}

stages {
Expand Down Expand Up @@ -174,6 +176,14 @@ pipeline {
}

stage("Checkout NPCs") {
when {
not {
anyOf {
environment name: "SIMULATOR_NPCS_REPOS", value: ""
environment name: "SIMULATOR_NPCS", value: ""
}
}
}
steps {
script {
def npcs = env.SIMULATOR_NPCS_REPOS.split(',')
Expand Down
6 changes: 4 additions & 2 deletions Jenkins/build-simulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ cp /mnt/AssetBundles/Controllables/controllable_* /tmp/${BUILD_OUTPUT}/AssetBund
mkdir -p /tmp/${BUILD_OUTPUT}/AssetBundles/Sensors
cp /mnt/AssetBundles/Sensors/sensor_* /tmp/${BUILD_OUTPUT}/AssetBundles/Sensors

mkdir -p /tmp/${BUILD_OUTPUT}/AssetBundles/NPCs
cp -R /mnt/AssetBundles/NPCs/* /tmp/${BUILD_OUTPUT}/AssetBundles/NPCs
if [ ! -z ${SIMULATOR_NPCS+x} ]; then
mkdir -p /tmp/${BUILD_OUTPUT}/AssetBundles/NPCs
cp -R /mnt/AssetBundles/NPCs/* /tmp/${BUILD_OUTPUT}/AssetBundles/NPCs
fi

cd /tmp
zip -r /mnt/${BUILD_OUTPUT}.zip ${BUILD_OUTPUT}

0 comments on commit eda3f59

Please sign in to comment.