From 46c4531182e734c943e9e7f55ea6829a8c0147ae Mon Sep 17 00:00:00 2001 From: simon987 Date: Fri, 3 Jan 2020 16:54:04 -0500 Subject: [PATCH] Remove jenkins integration --- README.md | 1 - jenkins/Jenkinsfile | 87 --------------------------------------------- jenkins/deploy.sh | 11 ------ 3 files changed, 99 deletions(-) delete mode 100644 jenkins/Jenkinsfile delete mode 100644 jenkins/deploy.sh diff --git a/README.md b/README.md index b619f83..ca3fc47 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ ![gopherbadger-tag-do-not-edit](https://img.shields.io/badge/Go%20Coverage-68%25-brightgreen.svg?longCache=true&style=flat-square) [![CodeFactor](https://www.codefactor.io/repository/github/simon987/task_tracker/badge)](https://www.codefactor.io/repository/github/simon987/task_tracker) -[![Build Status](https://ci.simon987.net/buildStatus/icon?job=task_tracker)](https://ci.simon987.net/job/task_tracker/) Fast task tracker (job queue) with authentication, statistics and web frontend diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile deleted file mode 100644 index 44934b4..0000000 --- a/jenkins/Jenkinsfile +++ /dev/null @@ -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' - } - } - } - } -} - - diff --git a/jenkins/deploy.sh b/jenkins/deploy.sh deleted file mode 100644 index 394bb7a..0000000 --- a/jenkins/deploy.sh +++ /dev/null @@ -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