-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathJenkinsfile
96 lines (88 loc) · 2.9 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
pipeline {
agent any
environment {
PATH = "/home/good4u/bin/cmake-3.28.3-linux-x86_64/bin:/home/good4u/bin/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin:/home/good4u/bin/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH"
}
stages {
stage('Setup') {
steps {
// Check Python version
sh 'python3 --version'
// Upgrade pip
sh 'python3 -m pip install --upgrade pip'
// Install the desired Python module
sh 'python3 -m pip install kconfiglib'
}
}
stage('Clone slos') {
steps {
// Clone the GitHub repository
git branch: 'master', url: 'https://github.com/chungae9ri/slos.git'
}
}
stage('Clone Submodule') {
steps {
// clone littlefs submodule
sh 'git submodule update --init --recursive'
}
}
stage('make Build') {
steps {
sh 'whoami'
//Run genuine make build steps here
sh 'make clean'
sh 'make'
// Run CMake build steps here
//script {
// dir('build') {
// sh 'pwd' // This will show 'build' as the current directory
// sh 'cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/arm-none-eabi.cmake ..'
// sh 'cmake --build .'
// }
//}
}
}
stage('cmake Build for aarch32') {
steps {
sh '/bin/bash build-cmake.sh -c'
// build apps -> ramdisk -> kernel32
sh '/bin/bash build-cmake.sh -prk'
}
}
stage('cmake Build for aarch64') {
steps {
sh '/bin/bash build-cmake.sh -c'
sh '/bin/bash build-cmake.sh -l'
}
}
stage('Clone slos-rust') {
steps {
// Clone the GitHub repository
git branch: 'master', url: 'https://github.com/chungae9ri/slos-rust.git'
}
}
stage('make slos-rust Build') {
steps {
sh 'whoami'
//Run genuine make build steps here
sh 'make clean'
sh 'make'
}
}
}
// Define a trigger to run the pipeline whenever there is a new commit to the GitHub repository
triggers {
// pollSCM('*/5 * * * *')
cron('0 20 * * *')
}
post {
//always {
// Pull the latest changes from the GitHub repository
//git branch: 'master', url: 'https://github.com/chungae9ri/slos.git'
//}
success {
// Run any post-build steps here
echo "slos CI/CD successfully done"
}
}
}