Add a simple Jenkinsfile

This commit is contained in:
R Tyler Croy 2024-04-21 15:31:36 +00:00
parent a5c501665e
commit 5f08f7a13c
4 changed files with 57 additions and 0 deletions

35
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,35 @@
/*
* This Jenkinsfile is for internal use
*/
pipeline {
agent {
label 'rust'
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Prepare') {
steps {
sh './ci/setup.sh'
}
}
stage('Build') {
steps {
sh './ci/build.sh'
}
}
stage('Test') {
steps {
sh './ci/test.sh'
}
}
}
}
// vim: ft=groovy sw=2 ts=2 et

3
ci/build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cargo lambda build

16
ci/setup.sh Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
which cargo-lambda
if [ $? -ne 0 ]; then
cargo install cargo-lambda
fi;
which virtualenv
if [ $? -ne 0 ]; then
echo ">> Virtualenv is required in order to setup cargo-lambda here!"
exit 1;
fi;
virtualenv venv

3
ci/test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cargo test --verbose