name: 'ROOTFS_URL'
default: 'https://obj.internal.efficios.com/lava/rootfs/rootfs_amd64_xenial_2018-12-05.tar.gz'
description: 'The URL at which the system root FS can be downloaded'
+ - string:
+ name: 'LTTNG_CI_REPO'
+ default: 'https://github.com/lttng/lttng-ci.git'
+ description: 'LTTng-ci git repo to checkout the CI scripts'
+ - string:
+ name: 'LTTNG_CI_BRANCH'
+ default: 'master'
+ description: 'The branch of the CI repository to clone for job scripts'
- publisher:
name: 'system_tests_email_ext_default'
properties-content: |
BUILD_DEVICE=kvm
LTTNG_VERSION={lttngversion}
+ LTTNG_CI_REPO=${{LTTNG_CI_REPO}}
+ LTTNG_CI_BRANCH=${{LTTNG_CI_BRANCH}}
scm:
- git:
- url: https://github.com/lttng/lttng-ci
+ url: "${{LTTNG_CI_REPO}}"
basedir: src/lttng-ci/
+ branches:
+ - "${{LTTNG_CI_BRANCH}}"
builders:
- shell: !include-raw-escape: scripts/system-tests/generate-properties-master.sh
properties-content: |
BUILD_DEVICE=baremetal
LTTNG_VERSION={lttngversion}
+ LTTNG_CI_REPO=${{LTTNG_CI_REPO}}
+ LTTNG_CI_BRANCH=${{LTTNG_CI_BRANCH}}
scm:
- git:
- url: https://github.com/lttng/lttng-ci
+ url: "${{LTTNG_CI_REPO}}"
basedir: src/lttng-ci/
+ branches:
+ - "${{LTTNG_CI_BRANCH}}"
builders:
- shell: !include-raw-escape: scripts/system-tests/generate-properties-master.sh
- string:
name: 'S3_STORAGE_LTTNG_MODULES'
description: 'Path to store the LTTng Modules'
+ - string:
+ name: 'LTTNG_CI_REPO'
+ default: 'https://github.com/lttng/lttng-ci.git'
+ description: 'LTTng-ci git repo to checkout the CI scripts'
+ - string:
+ name: 'LTTNG_CI_BRANCH'
+ default: 'master'
+ description: 'The branch of the CI repository to clone for job scripts'
properties:
- build-discarder:
scm:
- git:
- url: https://github.com/lttng/lttng-ci
+ url: "${{LTTNG_CI_REPO}}"
basedir: src/lttng-ci/
+ branches:
+ - "${{LTTNG_CI_BRANCH}}"
builders:
- shell: !include-raw-escape: scripts/system-tests/checkout-modules.sh
run:
steps:
- apt install -y curl
- - git clone https://github.com/lttng/lttng-ci ci
+ - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
- export TMPDIR="/tmp"
- systemctl stop systemd-timesyncd.service
- mkdir -p coredump
run:
steps:
- apt install -y curl
- - git clone https://github.com/lttng/lttng-ci ci
+ - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
- export TMPDIR="/tmp"
- mkdir -p coredump
- echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
run:
steps:
- apt install -y libpfm4-dev curl
- - git clone https://github.com/lttng/lttng-ci ci
+ - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
- export TMPDIR="/tmp"
- mkdir -p coredump
- echo "$(pwd)/coredump/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
- pip3 install 'pip==20.3'
- hash -r
- pip3 install vlttng
- - git clone https://github.com/lttng/lttng-ci ci
+ - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci
- mkdir -p /root/.ssh
- chmod 700 /root/.ssh
- cp lava/system-tests/authorized_keys /root/.ssh/authorized_keys
LTTNG_CI_PATH="$WORKSPACE/src/lttng-ci"
echo "LTTNG_CI_PATH=$LTTNG_CI_PATH" >> properties.txt
+echo "LTTNG_CI_REPO=$LTTNG_CI_REPO" >> properties.txt
+echo "LTTNG_CI_BRANCH=$LTTNG_CI_BRANCH" >> properties.txt
KERNEL_COMMIT_ID=$KERNEL_TAG_ID
echo "KERNEL_COMMIT_ID=$KERNEL_COMMIT_ID" >> properties.txt
'-r', '--rootfs-url', required=False,
default="https://obj.internal.efficios.com/lava/rootfs/rootfs_amd64_xenial_2018-12-05.tar.gz"
)
+ parser.add_argument('--ci-repo', required=False, default='https://github.com/lttng/lttng-ci.git')
+ parser.add_argument('--ci-branch', required=False, default='master')
args = parser.parse_args()
if args.type not in TestType.values:
context['kprobe_round_nb'] = 10
+ context['ci_repo'] = args.ci_repo
+ context['ci_branch'] = args.ci_branch
+
render = jinja_template.render(context)
print('Job to be submitted:')
-tc "$LTTNG_TOOLS_COMMIT_ID" \
-uc "$LTTNG_UST_COMMIT_ID" \
-id "$BUILD_TAG" \
- -r "$ROOTFS_URL"
+ -r "$ROOTFS_URL" \
+ --ci-repo "$LTTNG_CI_REPO" \
+ --ci-branch "$LTTNG_CI_BRANCH"
set +eu
deactivate
-tc "$LTTNG_TOOLS_COMMIT_ID" \
-uc "$LTTNG_UST_COMMIT_ID" \
-id "$BUILD_TAG" \
- -r "$ROOTFS_URL"
+ -r "$ROOTFS_URL" \
+ --ci-repo "$LTTNG_CI_REPO" \
+ --ci-branch "$LTTNG_CI_BRANCH"
set +eu
deactivate
- test:
definitions:
# Base setup #
- - repository: https://github.com/lttng/lttng-ci.git
+ - repository: {{ ci_repo }}
from: git
+ branch: {{ ci_branch }}
path: lava/system-tests/setup.yml
name: x86-env-setup
+ params:
+ CI_REPO: {{ ci_repo }}
+ CI_BRANCH: {{ ci_branch }}
# Base vlttng setup #
- repository:
metadata:
name: vlttng-env-setup-inline
path: inline/vlttng-env-setup
{% if test_type == TestType.baremetal_tests %}
- - repository: https://github.com/lttng/lttng-ci.git
+ - repository: {{ ci_repo }}
from: git
+ branch: {{ ci_branch }}
path: lava/system-tests/perf-tests.yml
name: perf-tests
params:
LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
+ CI_REPO: {{ ci_repo }}
+ CI_BRANCH: {{ ci_branch }}
{% elif test_type == TestType.kvm_tests %}
- - repository: https://github.com/lttng/lttng-ci.git
+ - repository: {{ ci_repo }}
from: git
+ branch: {{ ci_branch }}
path: lava/system-tests/kernel-tests.yml
name: kernel-tests
params:
LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
- - repository: https://github.com/lttng/lttng-ci.git
+ CI_REPO: {{ ci_repo }}
+ CI_BRANCH: {{ ci_branch }}
+ - repository: {{ ci_repo }}
from: git
+ branch: {{ ci_branch }}
path: lava/system-tests/destructive-tests.yml
name: destructive-tests
params:
LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
+ CI_REPO: {{ ci_repo }}
+ CI_BRANCH: {{ ci_branch }}
{% endif %}