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

Feature/next #215

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
95b4beb
poll build now
rsiwicki Jan 19, 2022
85b2b2f
agaion
rsiwicki Jan 19, 2022
b6263d1
adding readme
rsiwicki Jan 19, 2022
01b9468
added reamde info
rsiwicki Jan 20, 2022
bd2b756
Merge pull request #1 from rsiwicki/readme
rsiwicki Jan 20, 2022
a5e94dc
added jenkinsfile
rsiwicki Jan 20, 2022
67c6ed8
Merge pull request #2 from rsiwicki/feature/thispipe
rockdata01 Jan 20, 2022
c43bf15
added test and package jobs to worker pipeline
rsiwicki Jan 20, 2022
962ca2e
suped the complete message
rsiwicki Jan 20, 2022
c3226d2
run archival
rsiwicki Jan 20, 2022
5378f4b
2
rsiwicki Jan 20, 2022
ad3073e
fixed
rsiwicki Jan 20, 2022
3de404c
run packaging step only for master, run stagesion only when worker co…
rsiwicki Jan 20, 2022
0cac247
its necessary
rsiwicki Jan 22, 2022
d3dede5
smileyface
rsiwicki Jan 22, 2022
b1e2188
Merge pull request #3 from rsiwicki/feature/thispipe
rockdata01 Jan 22, 2022
b0c7e73
added jenkins file for result app
rsiwicki Jan 22, 2022
c801885
added a dev test
rsiwicki Jan 22, 2022
5614c9b
fix nodejs bug
rsiwicki Jan 22, 2022
c223aec
blah blah
rsiwicki Jan 22, 2022
252ffe3
Merge branch 'feature/resultspipe'
rsiwicki Jan 22, 2022
e273038
user docker agent insted of maven
rsiwicki Jan 22, 2022
a570848
user docker agent insted of maven obs
rsiwicki Jan 22, 2022
08d4db8
implement test 5
rsiwicki Jan 22, 2022
f8f96d8
docker for node app
rsiwicki Jan 22, 2022
dbb8f49
docker for node app again
rsiwicki Jan 22, 2022
bfc023f
start autobuild file
rsiwicki Jan 22, 2022
ef2ed91
load
rsiwicki Jan 22, 2022
22c494f
root user
rsiwicki Jan 22, 2022
482b204
Merge pull request #4 from rsiwicki/feature/dockerbuilds
rsiwicki Jan 22, 2022
a484e81
added dockerfiles for worker apps
rsiwicki Jan 22, 2022
9fc3313
I docker image a build
rsiwicki Jan 22, 2022
8f3456f
remove master branch
rsiwicki Jan 22, 2022
4b14e11
I agent for multi
rsiwicki Jan 22, 2022
8523968
I agent for multi d
rsiwicki Jan 22, 2022
e89a812
RemoVe colon
rsiwicki Jan 22, 2022
e23573c
version
rsiwicki Jan 22, 2022
683d7d7
version
rsiwicki Jan 22, 2022
f1ccbe6
version
rsiwicki Jan 22, 2022
a3b05bb
version
rsiwicki Jan 22, 2022
6ba6f2d
package
rsiwicki Jan 22, 2022
a659085
Merge branch 'master' into feature/dockerfiles
rsiwicki Jan 22, 2022
4adb3d3
Merge pull request #5 from rsiwicki/feature/dockerfiles
rockdata01 Jan 22, 2022
252ba01
so docker file
rsiwicki Jan 22, 2022
5f41efb
Merge pull request #6 from rsiwicki/feature/sodocker
rockdata01 Jan 22, 2022
eceeaa9
tris branch
rsiwicki Jan 23, 2022
84a9631
Merge pull request #7 from rsiwicki/feature/tris
rsiwicki Jan 23, 2022
f39f663
:-)
rsiwicki Jan 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Example Voting App
=========

This a test

Getting started
---------------

Expand Down
60 changes: 60 additions & 0 deletions result/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
pipeline {
agent none

stages {
stage('build') {
agent {
docker {
image 'node:8.16.0-alpine'
}
}
when {
changeset '**/result/**'
}
steps {
dir('result') {
sh 'npm install'
}
}
}
stage('test') {
agent {
docker {
image 'node:8.16.0-alpine'
}
}
when {
changeset '**/result/**'
}
steps {
dir('result') {
sh 'npm install'
sh 'npm test'
}
}
}
stage('docker-package') {
agent any
when {
changeset '**/result/**'
branch 'master'
}
steps {
echo 'worker app with docker'
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin'){
def workerImage = docker.build("robrockdataio/result:v${env.BUILD_ID}","./result")
workerImage.push()
workerImage.push("${env.BRANCH_NAME}")
}
}
}
}

}
post {
always {
echo 'This pipeline is completed now :-) >-) :-)'
}
}
}
6 changes: 6 additions & 0 deletions result/test/mock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ describe('mock test 4', () => {
});
});

describe('mock test 5 blah', () => {
it('unit test 5', () => {
expect(true).to.be.true;
});
});


63 changes: 63 additions & 0 deletions vote/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pipeline {
agent none

stages {
stage('build') {
agent {
docker {
image 'python:2.7.16-slim'
args '--user root'
}
}
when {
changeset '**/vote/**'
}
steps {
dir('vote') {
sh 'pip install -r requirements.txt'
}
}
}
stage('test') {
agent {
docker {
image 'python:2.7.16-slim'
args '--user root'
}
}
when {
changeset '**/vote/**'
}
steps {
dir('vote') {
sh 'nosetests -v'
}
}
}

stage('docker-package') {
agent any
when {
changeset '**/vote/**'
branch 'master'
}
steps {
echo 'worker app with docker'
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin'){
def workerImage = docker.build("robrockdataio/vote:v${env.BUILD_ID}","./vote")
workerImage.push()
workerImage.push("${env.BRANCH_NAME}")
}
}
}
}


}
post {
always {
echo 'This pipeline is completed now :-)'
}
}
}
1 change: 1 addition & 0 deletions vote/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def get_redis():
@app.route("/", methods=['POST','GET'])
def hello():
voter_id = request.cookies.get('voter_id')
# test comment now
if not voter_id:
voter_id = hex(random.getrandbits(64))[2:-1]

Expand Down
2 changes: 1 addition & 1 deletion vote/tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUp(self):


def test_home_status_code(self):
"""Assert that the home page loads successfully"""
"""Assert that the home page loadz successfully"""
result = self.app.get('/')
self.assertEqual(result.status_code, 200)

Expand Down
11 changes: 11 additions & 0 deletions worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.6.1-jdk-8-alpine

WORKDIR /app

COPY . .

RUN mvn package -DskipTests && \
mv target/worker-jar-with-dependencies.jar /run/worker.jar && \
rm -rf *

CMD java -jar /run/worker.jar
84 changes: 84 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
pipeline {

agent none

stages {
stage('build') {
agent{
docker {
image 'maven:3.6.1-jdk-8-alpine'
args '-v $HOME/.m2:/root/.m2'
}
}
when {
changeset '**/worker/**'
}
steps {
dir('worker') {
sh 'mvn compile'
}
}
}
stage('test') {
agent{
docker {
image 'maven:3.6.1-jdk-8-alpine'
args '-v $HOME/.m2:/root/.m2'
}
}
when {
changeset '**/worker/**'
}
steps {
dir('worker') {
sh 'mvn clean test'
}
}
}
stage('package') {
agent{
docker {
image 'maven:3.6.1-jdk-8-alpine'
args '-v $HOME/.m2:/root/.m2'
}
}
when {
branch 'master'
changeset '**/worker/**'
}
steps {
dir('worker') {
sh 'mvn package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
}
}
}

stage('docker-package') {
agent any
when {
changeset '**/worker/**'
branch 'master'
}
steps {
echo 'worker app with docker'
script {
docker.withRegistry('https://index.docker.io/v1/', 'dockerlogin'){
def workerImage = docker.build("robrockdataio/worker:v${env.BUILD_ID}","./worker")
workerImage.push()
workerImage.push("${env.BRANCH_NAME}")
}
}
}
}


}

post {
always {
echo 'This pipeline is completed now dockerized >-) >-) >-)'

}
}
}
1 change: 1 addition & 0 deletions worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Worker Java App
6 changes: 6 additions & 0 deletions worker/src/test/java/worker/UnitWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ void sample3() {
void sample4() {

}

@Test
void sample5() {

}

}