diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..64e7582 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +pipeline{ + agent{ + label any + } + stages{ + stage('Build') { + steps { + echo 'Building shagram...' + sh 'docker build -t shagram-shagram:latest .' + } + } + stage('Test') { + steps { + echo 'Testing...' + sh 'docker run --rm shagram-shagram:latest sqlite3 /app/shagram.db "SELECT 1;" || true' + } + } + stage('Deploy') { + steps { + echo 'Deploying...' + sh ''' + docker-compose down || true + docker-compose up -d + docker-compose ps + ''' + } + } + } +} \ No newline at end of file