Skip to content

Commit eda3f59

Browse files
committed
Build NPCs only if specified
1 parent d14ac6f commit eda3f59

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

Jenkins/Jenkinsfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ pipeline {
175175
}
176176

177177
stage("Checkout NPCs") {
178+
when {
179+
not {
180+
anyOf {
181+
environment name: "SIMULATOR_NPCS_REPOS", value: ""
182+
environment name: "SIMULATOR_NPCS", value: ""
183+
}
184+
}
185+
}
178186
steps {
179187
script {
180188
def npcs = env.SIMULATOR_NPCS_REPOS.split(',')

Jenkins/Jenkinsfile-Release

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pipeline {
2828
FORCE_REBUILD = "${FORCE_REBUILD}"
2929
SIMULATOR_ENVIRONMENTS = "${SIMULATOR_ENVIRONMENTS_RELEASE}"
3030
SIMULATOR_SENSORS = "${SIMULATOR_SENSORS_RELEASE}"
31+
SIMULATOR_NPCS_REPOS = "${SIMULATOR_NPCS_REPOS_RELEASE}"
32+
SIMULATOR_NPCS = "${SIMULATOR_NPCS_RELEASE}"
3133
}
3234

3335
stages {
@@ -174,6 +176,14 @@ pipeline {
174176
}
175177

176178
stage("Checkout NPCs") {
179+
when {
180+
not {
181+
anyOf {
182+
environment name: "SIMULATOR_NPCS_REPOS", value: ""
183+
environment name: "SIMULATOR_NPCS", value: ""
184+
}
185+
}
186+
}
177187
steps {
178188
script {
179189
def npcs = env.SIMULATOR_NPCS_REPOS.split(',')

Jenkins/build-simulator.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,10 @@ cp /mnt/AssetBundles/Controllables/controllable_* /tmp/${BUILD_OUTPUT}/AssetBund
234234
mkdir -p /tmp/${BUILD_OUTPUT}/AssetBundles/Sensors
235235
cp /mnt/AssetBundles/Sensors/sensor_* /tmp/${BUILD_OUTPUT}/AssetBundles/Sensors
236236

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

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

0 commit comments

Comments
 (0)