pipeline {
	agent {
		docker {
			image 'rust:latest'
		}
	}

	stages {
		stage('Clippy') {
			steps {
				sh "rustup component add clippy"
				sh "cargo clippy --all-targets --all-features -- -D warnings"
			}
		}
		stage('Build') {
			steps {
				sh "cargo build --release"
			}
		}
	}

	post {
		always {
			archiveArtifacts artifacts: 'target/release/dotacat', fingerprint: true
		}
	}
}