mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-10 05:56:42 +00:00
Remove jenkins integration
This commit is contained in:
parent
017ed14462
commit
46c4531182
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
<a href='https://github.com/jpoles1/gopherbadger' target='_blank'></a>
|
<a href='https://github.com/jpoles1/gopherbadger' target='_blank'></a>
|
||||||
[](https://www.codefactor.io/repository/github/simon987/task_tracker)
|
[](https://www.codefactor.io/repository/github/simon987/task_tracker)
|
||||||
[](https://ci.simon987.net/job/task_tracker/)
|
|
||||||
|
|
||||||
Fast task tracker (job queue) with authentication, statistics and web frontend
|
Fast task tracker (job queue) with authentication, statistics and web frontend
|
||||||
|
|
||||||
|
87
jenkins/Jenkinsfile
vendored
87
jenkins/Jenkinsfile
vendored
@ -1,87 +0,0 @@
|
|||||||
def remote = [:]
|
|
||||||
remote.name = 'remote'
|
|
||||||
remote.host = env.DEPLOY_HOST
|
|
||||||
remote.user = env.DEPLOY_USER
|
|
||||||
remote.identityFile = '/var/lib/jenkins/.ssh/id_rsa'
|
|
||||||
remote.knownHosts = '/var/lib/jenkins/.ssh/known_hosts'
|
|
||||||
remote.allowAnyHosts = true
|
|
||||||
remote.retryCount = 3
|
|
||||||
remote.retryWaitSec = 3
|
|
||||||
remote.port = 2299
|
|
||||||
logLevel = 'FINER'
|
|
||||||
|
|
||||||
pipeline {
|
|
||||||
agent none
|
|
||||||
environment {
|
|
||||||
GOOS='linux'
|
|
||||||
CGO_ENABLED='0'
|
|
||||||
HOME='.'
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('Parallel build & test') {
|
|
||||||
failFast true
|
|
||||||
parallel {
|
|
||||||
stage('Build - web') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'node:10-alpine'
|
|
||||||
args '--network "host"'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'cd web/angular/ && npm install'
|
|
||||||
sh 'cd web/angular/ && ./node_modules/\\@angular/cli/bin/ng build --prod --optimization --output-path "${WORKSPACE}/webroot"'
|
|
||||||
stash includes: 'webroot/', name: 'webdist'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build - api') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'golang:latest'
|
|
||||||
args '--network "host"'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'mkdir -p /go/src/github.com/task_tracker'
|
|
||||||
sh 'cp -r api config main storage config.yml schema.sql "/go/src/github.com/task_tracker"'
|
|
||||||
sh 'cd /go/src/github.com/task_tracker/main && go get ./...'
|
|
||||||
sh 'cd /go/src/github.com/task_tracker/main && go build -a -installsuffix cgo -o "${WORKSPACE}/tt_api" .'
|
|
||||||
stash includes: 'tt_api', name: 'apidist'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Test - api') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'golang:latest'
|
|
||||||
args '--network "host"'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'mkdir -p /go/src/github.com/task_tracker'
|
|
||||||
sh 'cp -r api config main storage test config.yml schema.sql "/go/src/github.com/task_tracker"'
|
|
||||||
sh 'cd /go/src/github.com/task_tracker/ && go get -t ./test/...'
|
|
||||||
sh 'cd /go/src/github.com/task_tracker/test && go test .'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Deploy') {
|
|
||||||
agent none
|
|
||||||
steps {
|
|
||||||
node('master') {
|
|
||||||
unstash 'webdist'
|
|
||||||
unstash 'apidist'
|
|
||||||
sshCommand remote: remote, command: "cd task_tracker && rm -rf tt_api config.yml schema.sql webroot deploy.sh"
|
|
||||||
sshPut remote: remote, from: 'tt_api', into: 'task_tracker/tt_api'
|
|
||||||
sshPut remote: remote, from: 'config.yml', into: 'task_tracker/config.yml'
|
|
||||||
sshPut remote: remote, from: 'schema.sql', into: 'task_tracker/schema.sql'
|
|
||||||
sshPut remote: remote, from: 'webroot/', into: 'task_tracker'
|
|
||||||
sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'task_tracker/'
|
|
||||||
sshCommand remote: remote, command: 'chmod +x task_tracker/deploy.sh && ./task_tracker/deploy.sh'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export TTROOT="task_tracker"
|
|
||||||
|
|
||||||
chmod 755 -R "${TTROOT}/webroot"
|
|
||||||
|
|
||||||
screen -S tt_api -X quit
|
|
||||||
echo "starting client"
|
|
||||||
screen -S tt_api -d -m bash -c "cd ${TTROOT} && chmod +x tt_api && ./tt_api 2> stderr.txt"
|
|
||||||
sleep 1
|
|
||||||
screen -list
|
|
Loading…
x
Reference in New Issue
Block a user