Skip to content
Snippets Groups Projects
Commit f975238d authored by Xiao Pan's avatar Xiao Pan
Browse files

Test mounted cache

parent cd43916b
Branches
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* SPDX-License-Identifier: EPL-2.0 * SPDX-License-Identifier: EPL-2.0
*******************************************************************************/ *******************************************************************************/
pipeline { pipeline {
agent none agent none
options { options {
...@@ -25,24 +26,30 @@ apiVersion: v1 ...@@ -25,24 +26,30 @@ apiVersion: v1
kind: Pod kind: Pod
spec: spec:
containers: containers:
- name: roadlogicsuite-build - name: roadlogicsuite-build
image: xiaopanansys/road-logic-suite-dev:latest image: 'xiaopanansys/road-logic-suite-dev:latest'
tty: true tty: true
resources: resources: null
limits: limits:
memory: "16Gi" memory: 16Gi
cpu: "4" cpu: '4'
requests: requests:
memory: "16Gi" memory: 16Gi
cpu: "4" cpu: '4'
- name: jnlp volumeMounts:
volumeMounts: - name: cache-volume
- name: volume-known-hosts mountPath: /home/jenkins/cache
mountPath: /home/jenkins/.ssh - name: jnlp
volumeMounts:
- name: volume-known-hosts
mountPath: /home/jenkins/.ssh
volumes: volumes:
- name: volume-known-hosts - name: volume-known-hosts
configMap: configMap:
name: known-hosts name: known-hosts
- name: cache-volume
persistentVolumeClaim:
claimName: cache-pvc
""" """
} }
} }
...@@ -52,32 +59,11 @@ spec: ...@@ -52,32 +59,11 @@ spec:
runScript('10_prepare.sh') runScript('10_prepare.sh')
} }
} }
// stage('Run Small Checks') {
// steps {
// runScript('20_run_checks.sh')
// }
// }
stage('Build and Tests') { stage('Build and Tests') {
steps { steps {
runScript('21_run_build_and_test.sh') runScript('21_run_build_and_test.sh')
} }
} }
// stage('Run Sanitizer Checks') {
// steps {
// runScript('23_sanitizer_checks.sh')
// }
// }
// stage('Run Clang-tidy Checks') {
// steps {
// runScript('22_clang_tidy_checks.sh')
// }
// }
// stage('Generate Artifacts') {
// steps {
// runScript('30_generate_artifacts.sh')
// }
// }
} }
post { post {
always { always {
...@@ -91,6 +77,6 @@ spec: ...@@ -91,6 +77,6 @@ spec:
// Define a global function to run scripts in the 'roadlogicsuite-build' container // Define a global function to run scripts in the 'roadlogicsuite-build' container
def runScript(String scriptName) { def runScript(String scriptName) {
container('roadlogicsuite-build') { container('roadlogicsuite-build') {
sh "bash repo/utils/ci/scripts/${scriptName}" sh "bash repo/utils/ci/scripts/${scriptName}"
} }
} }
...@@ -52,34 +52,34 @@ whereis buildifier ...@@ -52,34 +52,34 @@ whereis buildifier
# echo ">>> print system info" echo ">>> print system info"
# echo ">>> CPU Core Numbers and Frequency:" echo ">>> CPU Core Numbers and Frequency:"
# lscpu lscpu
# echo ">>> " echo ">>> "
# echo ">>> Memory Size:" echo ">>> Memory Size:"
# free -h free -h
# echo ">>> " echo ">>> "
# echo ">>> Hard Disk Size:" echo ">>> Hard Disk Size:"
# df -h df -h
# echo ">>> " echo ">>> "
# echo ">>> System Folder Structure" echo ">>> System Folder Structure"
# cd "${BASEDIR}" || exit 1 cd "${BASEDIR}" || exit 1
# ls -la ls -la
# cd .. cd ..
# ls -la ls -la
# cd .. cd ..
# echo $PWD echo $PWD
# ls -la ls -la
# cd .. cd ..
# echo $PWD echo $PWD
# ls -la ls -la
echo "Checkout git submodules recursively ..." echo "Checkout git submodules recursively ..."
git submodule update --init --recursive git submodule update --init --recursive
...@@ -16,7 +16,7 @@ MYDIR="$(dirname "$(readlink -f $0)")" ...@@ -16,7 +16,7 @@ MYDIR="$(dirname "$(readlink -f $0)")"
BASEDIR=$(realpath "${MYDIR}/../../../..") BASEDIR=$(realpath "${MYDIR}/../../../..")
CACHEDIR=$(realpath "${BASEDIR}/.cache") CACHEDIR=$(realpath "${BASEDIR}/.cache")
BAZEL_CACHEDIR=$(realpath "${BASEDIR}/../../caches/bazel-road-logic-suite") BAZEL_CACHEDIR="/home/jenkins/cache"
# This override the cache folder of bazel # This override the cache folder of bazel
export TEST_TMPDIR="${BAZEL_CACHEDIR}" export TEST_TMPDIR="${BAZEL_CACHEDIR}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment