Skip to content

Commit 3281012

Browse files
authored
Merge pull request #234 from saheerb/dev/dgreen-arm/openci-testing
Activate ARMCLANG via pre-generated license file
2 parents 55c9948 + 9612ba9 commit 3281012

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

vars/common.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,12 @@ String docker_script(
228228
String platform,
229229
String entrypoint,
230230
String entrypoint_arguments='',
231-
Iterable<String> env_vars=[]
231+
Iterable<String> env_vars=[],
232+
Iterable<String> volumes = []
232233
) {
233234
def docker_image = get_docker_tag(platform)
234235
def env_args = env_vars.collect({ e -> "-e $e" }).join(' ')
236+
def volume_args = volumes.collect({ v -> "-v $v" }).join(' ')
235237
/* Docker disables IPv6 networking by default, but some combination of docker daemon and linux kernel versions
236238
* causes GnuTLS to attempt using an IPv6 address anyways, so we manually disable all IPv6 inside the container.
237239
* We also ignore the fact that the IPv6 tests are not executed in analyze_outcomes.py.
@@ -241,6 +243,7 @@ String docker_script(
241243
return """\
242244
docker run -u \$(id -u):\$(id -g) -e MAKEFLAGS -e VERBOSE_LOGS $env_args --rm --entrypoint $entrypoint \
243245
-w /var/lib/build -v `pwd`/src:/var/lib/build \
246+
$volume_args \
244247
--sysctl net.ipv6.conf.all.disable_ipv6=1 \
245248
--cap-add SYS_PTRACE $docker_repo:$docker_image $entrypoint_arguments
246249
"""

vars/gen_jobs.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,13 @@ ${extra_setup_code}
277277
if (use_docker) {
278278
analysis.record_inner_timestamps(node_label, job_name) {
279279
if ((common.is_legacy_open_ci_env || common.is_openci_env) && platform.startsWith('arm-compilers')) {
280-
withCredentials([string(credentialsId: 'MBEDTLS_ARMCLANG_UBL_CODE', variable:'MBEDTLS_ARMCLANG_UBL_CODE')]) {
280+
withCredentials([file(credentialsId: 'MBEDTLS_ARMCLANG_UBL_FILE', variable: 'MBEDTLS_ARMCLANG_UBL_FILE')]) {
281281
sh common.docker_script(
282282
platform,
283283
'/bin/sh',
284-
'-c \'exec $ARMC6_BIN_DIR/armlm activate -code "$MBEDTLS_ARMCLANG_UBL_CODE"\'',
285-
['MBEDTLS_ARMCLANG_UBL_CODE']
284+
'-c \'exec $ARMC6_BIN_DIR/armlm import --file /run/secrets/armclang_ubl_file\'',
285+
[],
286+
['${MBEDTLS_ARMCLANG_UBL_FILE}:/run/secrets/armclang_ubl_file:ro']
286287
)
287288
}
288289
}

0 commit comments

Comments
 (0)