Skip to content

Commit

Permalink
Test badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tas-sos committed Mar 11, 2021
1 parent 6a19b8c commit 6ef2bf5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
def testBuildBadge = addEmbeddableBadgeConfiguration(id: "teststatus", subject: "Selenium Tests")

pipeline {
agent any
options {
Expand Down Expand Up @@ -41,9 +43,13 @@ pipeline {
}
stage ('Run Tests') {
steps {
withCredentials(bindings: [string(credentialsId: 'tinyMCE_key', variable: 'TINYMCEKEY')]) {
sh 'sed -i "s/my-api-key/${TINYMCEKEY}/g" $WORKSPACE/$PROJECT_DIR/ui/config/environment.js'
}
testBuildBadge.setStatus('running')
testBuildBadge.setColor('blue')
try
{
withCredentials(bindings: [string(credentialsId: 'tinyMCE_key', variable: 'TINYMCEKEY')])
{ sh 'sed -i "s/my-api-key/${TINYMCEKEY}/g" $WORKSPACE/$PROJECT_DIR/ui/config/environment.js' }

echo 'Create docker containers...'
sh '''
cd $WORKSPACE/$PROJECT_DIR
Expand All @@ -55,6 +61,14 @@ pipeline {
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8000/ui/auth/login)" != "200" ]]; do if [[ "$(docker ps | grep agora | wc -l)" != "2" ]]; then exit 1; fi; sleep 5; done
pipenv run pytest agora_unit_tests.py -o junit_family=xunit2 --junitxml=reports/junit.xml
'''
testBuildBadge.setStatus('passing')
testBuildBadge.setColor('brightgreen')
}
catch (Exception err)
{
testBuildBadge.setStatus('failing')
testBuildBadge.setColor('red')
}
}
post {
always {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Agora
[![Build Status](https://jenkins.einfra.grnet.gr/job/AGORA/job/master/badge/icon)](https://jenkins.einfra.grnet.gr/job/AGORA/job/master/)
[![Selenium Tests](https://jenkins.einfra.grnet.gr/job/AGORA/job/devel/badge/icon?config=teststatus)](https://jenkins.einfra.grnet.gr/job/AGORA/job/devel/)

The service portfolio management tool is a tool that allows a company / project to manage the portfolio of services they to maintain (offered to users / customers or internal).
Agora provides an intuitive user interface which allows users to create/edit/update/delete their services and components. Users can login with credentials provided by the administrator, or use the shibboleth login functionality to login with their academic account.
Expand Down

0 comments on commit 6ef2bf5

Please sign in to comment.