Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from TravisCI to Jenkins #114

Merged
merged 14 commits into from
Dec 24, 2020
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

60 changes: 60 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
pipeline {
agent any

stages {
stage('Build') {
steps {
sh '''#!/bin/bash
docker build -t nfmstudios/project-olly:master .
docker network create -d bridge project-olly-net
docker run -d --network=project-olly-net -e "POSTGRES_PASSWORD=secret_password" -e "POSTGRES_USER=olly" --name project-olly-db postgres:12
sleep 30
'''
}
}
stage('Test') {
steps {
sh '''#!/bin/bash
docker run --network=project-olly-net --env-file .env.example --name project-olly nfmstudios/project-olly:master python3 manage.py test
'''
}
}
}
post {
always {
script {
env.msg = "**Status:** " + currentBuild.currentResult.toLowerCase() + "\n"
env.msg += "**Branch:** ${env.BRANCH_NAME}\n"
env.msg += "**Changes:** \n"
if (!currentBuild.changeSets.isEmpty()) {
currentBuild.changeSets.first().getLogs().each {
env.msg += "- `" + it.getCommitId().substring(0, 8) + "` *" + it.getComment().substring(0, it.getComment().length()-1) + it.getAuthor() + "*\n"
}
} else {
env.msg += "no changes for this run\n"
}
if (env.msg.length() > 1024) env.msg.take(env.msg.length() - 1024)
}
withCredentials([string(credentialsId: 'Webook_URL', variable: 'WEBHOOK_URL')]) {
discordSend description: "${env.msg}", link: env.BUILD_URL, result: currentBuild.currentResult, title: "Project Olly:${env.BRANCH_NAME} Build #${env.BUILD_NUMBER} ${currentBuild.currentResult}", webhookURL: env.WEBHOOK_URL
}
}
success {
script {
if (env.BRANCH_NAME == 'master') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh'echo "$PASSWORD" | docker login -u $USERNAME --password-stdin && docker push nfmstudios/project-olly:master'
}
}
}
}
cleanup {
sh '''#!/bin/bash
docker rm -f project-olly 2> /dev/null
docker rm -f project-olly-db 2> /dev/null
docker network rm project-olly-net 2> /dev/null
docker rmi nfmstudios/project-olly:master 2> /dev/null
'''
}
}
}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
# About the project
Project Olly is an online esports tournament hosting platform written in Python 3 using the Django web framework. It began as a closed source commercial product until November 2019 when it was re-released under the MPL2.0 license (see license.md)

# Roadmap

- Single Eliminations Tournaments (Live - improvements coming soon)
- Leagues (Live - improvements coming soon)
- UserProfiles (completed)
- Support Tickets (completed)
- News Posts (completed)
- Match System (Live - improvements coming soon)
- Team system - team invites, captains (completed - improvements coming soon)
- PayPal Store for processing some payments (completed)
- Double Elimination Tournaments (planned)
- Ladders (planned)

# Installation

1. Clone the repository! You need the code, it won't just magically work without it. `git clone https://github.com/NFM-Studios/project-olly.git`
Expand Down