Skip to content

Test #222

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

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

Test #222

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6419a7a
piccola modifichetta al readme
neo-acap Aug 8, 2020
94f5e88
altra piccola modifichetta al readme
neo-acap Aug 8, 2020
47784fb
Merge pull request #1 from neo-acap/readme
acap65 Aug 8, 2020
45491a3
Create mio.txt
neo-acap Aug 8, 2020
d0ff05c
editato ancora
neo-acap Aug 8, 2020
6a248bb
Merge pull request #2 from neo-acap/neo-acap-patch-1
neo-acap Aug 8, 2020
6089292
Merge pull request #3 from neo-acap/pr-2/neo-acap/neo-acap-patch-1
neo-acap Aug 8, 2020
7e70afb
ripristinato readme corretto
neo-acap Aug 11, 2020
aad92d6
Merge pull request #4 from neo-acap/readme2
neo-acap Aug 11, 2020
e754ff5
aggiunto Jenkinsfile
neo-acap Aug 11, 2020
5adaa90
corretto Jenkinsfile
neo-acap Aug 11, 2020
6f2b716
changed Jenkinsfile added test and package
neo-acap Aug 11, 2020
70d13c4
changed Jenkinsfile added archiving artifacts
neo-acap Aug 11, 2020
ef01bb7
changed Jenkinsfile added conditional eecution
neo-acap Aug 11, 2020
d69ae46
aggiunto Jenkinsfile x app result
neo-acap Aug 12, 2020
942a1e9
aggiunto commento al Dockerfile
neo-acap Aug 12, 2020
13d95a6
tolto commento su Dockerfile
neo-acap Aug 12, 2020
a49f0da
aggiunto commento al Dockerfile
neo-acap Aug 12, 2020
dccf0c4
aggiunto commento al Dockerfile
neo-acap Aug 12, 2020
319ad4d
aggiunto commento al Dockerfile
neo-acap Aug 12, 2020
d28234a
aggiunto commento al Dockerfile
neo-acap Aug 12, 2020
4f7c2ab
corretto jenkinsfile
neo-acap Aug 12, 2020
1652c09
Merge pull request #5 from neo-acap/feature/workerpipe
neo-acap Aug 12, 2020
7d7ba43
refactor Jenkinsfile - now uses Docker agent
neo-acap Aug 13, 2020
c610a2e
piccola modifica al Jenkinsfile
neo-acap Aug 13, 2020
35acc4e
modificato file di test
neo-acap Aug 13, 2020
934e22a
refactor result app
neo-acap Aug 13, 2020
e9b6c46
corretto Jenkinsfile result
neo-acap Aug 13, 2020
6b13807
jenkinsfile for vote app
neo-acap Aug 13, 2020
147a683
small change just to trigger compile
neo-acap Aug 13, 2020
58fbd54
small change just to trigger compile
neo-acap Aug 13, 2020
b5b7e94
changed Jenkinsfile
neo-acap Aug 13, 2020
e8db563
Merge pull request #6 from neo-acap/feature/refactor-pipe
neo-acap Aug 13, 2020
744ec6c
Added Jenkinsfile
neo-acap Feb 3, 2022
26d144f
Update app.py
neo-acap Feb 3, 2022
6805fd3
Added Jenkinsfile
neo-acap Feb 3, 2022
3b479a5
Update Jenkinsfile
neo-acap Feb 3, 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
48 changes: 48 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline {

agent{
docker{
image 'python:2.7.16-slim'
args '--user root'
}
}

stages{

stage("build"){

when{
changeset "**/vote/**"
}

steps{
echo 'building vote app'
dir('vote'){
sh 'pip install -r requirements.txt'
}
}
}

stage("test"){

when{
changeset "**/vote/**"
}

steps{
echo 'Running Unit Tets on result app'
dir('vote'){
sh 'nosetests -v'
}
}
}


}

post{
always{
echo 'Fatto tutto pip. Benbrai..'
}
}
}
3 changes: 3 additions & 0 deletions mio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file di test
editato in locale
aggiunta riga
2 changes: 1 addition & 1 deletion result/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:8.9-alpine

# commento
RUN mkdir -p /app
WORKDIR /app

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

agent{
docker{
image 'node:8-alpine'
args '-v $HOME/.m2:/root/.m2' }
}

stages{

stage("build"){

when{
changeset "**/result/**"
}

steps{
echo 'building result app'
sh 'node --version'
dir('result'){
sh 'npm install'
}
}
}

stage("test"){

when{
changeset "**/result/**"
}

steps{
echo 'Running Unit Tets on result app'
dir('result'){
sh 'npm test'
}
}
}


}

post{
always{
echo 'Fatto tutto. Benbrai..'
}
}
}
48 changes: 48 additions & 0 deletions vote/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline {

agent{
docker{
image 'python:2.7.16-slim'
args '--user root'
}
}

stages{

stage("build"){

when{
changeset "**/vote/**"
}

steps{
echo 'building vote app'
dir('vote'){
sh 'pip install -r requirements.txt'
}
}
}

stage("test"){

when{
changeset "**/vote/**"
}

steps{
echo 'Running Unit Tets on result app'
dir('vote'){
sh 'nosetests -v'
}
}
}


}

post{
always{
echo 'Fatto tutto pip. Benbrai..'
}
}
}
2 changes: 1 addition & 1 deletion vote/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
option_a = os.getenv('OPTION_A', "Emacs")
option_b = os.getenv('OPTION_B', "Vi")
hostname = socket.gethostname()
version = 'v1'
version = 'v2'

app = Flask(__name__)

Expand Down
1 change: 0 additions & 1 deletion vote/tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def setUp(self):
self.app = app.test_client()
self.app.testing = True


def test_home_status_code(self):
"""Assert that the home page loads successfully"""
result = self.app.get('/')
Expand Down
41 changes: 41 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pipeline{
agent{
docker{
image 'maven:3.6.1-jdk-8-slim'
args '-v $HOME/.m2:/root/.m2' }
}

stages{
stage('uno'){
steps{
echo 'building worker app'
dir('worker'){
sh 'mvn compile'
}
}
}
stage('test'){
steps{
echo 'running unit tests on worker app'
dir('worker'){
sh 'mvn clean test'
}
}
}
stage('package'){
steps{
echo 'packaging worker app into a jarfile'
dir('worker'){
sh 'mvn package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar', fingerprint:true
}
}
}
}

post{
always{
echo 'the job is complete'
}
}
}