Add a simple Jenkinsfile
This commit is contained in:
parent
a5c501665e
commit
f922e93d30
|
@ -26,8 +26,7 @@ jobs:
|
|||
repo: cargo-lambda/cargo-lambda
|
||||
platform: linux # Other valid options: 'windows' or 'darwin'
|
||||
arch: x86_64 # Other valid options for linux: 'aarch64'
|
||||
# Add your build steps below
|
||||
- name: Build
|
||||
run: cargo lambda build
|
||||
run: ./ci/build.sh
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
run: ./ci/test.sh
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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'
|
||||
}
|
||||
}
|
||||
stage('Release') {
|
||||
steps {
|
||||
sh './ci/build-release.sh'
|
||||
archiveArtifacts artifacts: 'target/lambda/**/*.zip', fingerprint: true, onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// vim: ft=groovy sw=2 ts=2 et
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
cargo lambda build --release --output-format zip
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
cargo lambda build
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
cargo test --verbose
|
Loading…
Reference in New Issue