bundlewrap/Jenkinsfile

64 lines
2 KiB
Text
Raw Permalink Normal View History

2020-05-09 11:15:19 +00:00
pipeline {
agent any
stages {
stage('install_requirements') {
steps {
sh """
[ -d venv ] && rm -rf venv
2021-02-17 12:08:59 +00:00
2020-05-09 11:15:19 +00:00
virtualenv -p python3 venv
. venv/bin/activate
2021-02-17 12:08:59 +00:00
2023-02-05 16:34:39 +00:00
pip install --upgrade pip isort
2020-05-09 11:15:19 +00:00
pip install -r requirements.txt
"""
}
}
2023-02-05 16:34:39 +00:00
stage('tests') {
2020-05-16 08:14:40 +00:00
parallel {
2023-02-05 16:34:39 +00:00
stage('syntax checking using editorconfig-checker') {
steps {
sh """
wget -Oec-linux-amd64.tar.gz https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/ec-linux-amd64.tar.gz
tar -xzf ec-linux-amd64.tar.gz && rm ec-linux-amd64.tar.gz
bin/ec-linux-amd64 -no-color -exclude '^bin/'
"""
}
}
2021-02-17 12:08:59 +00:00
stage('config and metadata determinism') {
steps {
sh """
. venv/bin/activate
2021-02-17 12:08:59 +00:00
export BW_VAULT_DUMMY_MODE=1
2021-07-02 17:31:54 +00:00
export BW_PASS_DUMMY_MODE=1
bw test --metadata-determinism 3 --config-determinism 3
"""
}
}
2023-02-05 16:34:39 +00:00
stage('bw test -i') {
2020-05-16 08:14:40 +00:00
steps {
sh """
. venv/bin/activate
2021-02-17 12:08:59 +00:00
2020-05-16 08:14:40 +00:00
bw test --ignore-missing-faults
2021-02-17 12:08:59 +00:00
2020-05-16 08:14:40 +00:00
export BW_VAULT_DUMMY_MODE=1
2021-07-02 17:31:54 +00:00
export BW_PASS_DUMMY_MODE=1
2020-05-16 08:14:40 +00:00
bw test
"""
}
}
2020-05-09 11:15:19 +00:00
}
}
2020-05-17 17:15:43 +00:00
}
post {
always {
2021-02-17 12:37:26 +00:00
sh """
rm -rf venv
rm -rf bin
"""
2020-05-09 11:15:19 +00:00
}
}
}