From f1981e413d1880a7da5728839448b552d4a60dbb Mon Sep 17 00:00:00 2001 From: brnrs Date: Mon, 27 Apr 2020 17:44:14 +0200 Subject: [PATCH] base --- .gitignore | 8 ++++++++ Cargo.toml | 11 +++++++++++ Jenkinsfile | 20 ++++++++++++++++++++ LICENSE | 2 +- src/lib.rs | 7 +++++++ 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Cargo.toml create mode 100644 Jenkinsfile create mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore index 62bd1a4..a3283af 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,11 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + + +#Added by cargo +# +#already existing elements were commented out + +/target +#Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..68afe68 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "badcontext" +version = "0.1.0-SNAPSHOT" +authors = ["brnrs "] +edition = "2018" +description = "A small crate for creating Context structs that contain application components" +license = "MIT" +repository = "https://git.brnrs.pl/brnorg/badcontext" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..7017fbb --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,20 @@ +pipeline { + agent any + stages { + stage('update-rust') { + steps { + sh 'rustup update' + } + } + stage('build') { + steps { + sh 'cargo build --release --verbose' + } + } + stage('test') { + steps { + sh 'cargo test --release --verbose' + } + } + } +} diff --git a/LICENSE b/LICENSE index 204b93d..a77e670 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -MIT License Copyright (c) +MIT License Copyright (c) 2020 brnrs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}