Changeset - f65f8acaca84
[Not reviewed]
default
0 1 0
domruf - 9 years ago 2017-03-23 22:08:56
dominikruf@gmail.com
jenkinsfile: remove unnecessary lines

We use TEST_DB environment variable instead of editing test.ini to change the DB
configuration.
1 file changed with 0 insertions and 6 deletions:
0 comments (0 inline, 0 general)
Jenkinsfile
Show inline comments
 
@@ -59,16 +59,14 @@ node {
 
        }
 
    }
 
    def pytests = [:]
 
    pytests['sqlite'] = {
 
        ws {
 
            unstash name: 'kallithea'
 
            sh 'hg revert kallithea/tests/test.ini'
 
            if (isUnix()) {
 
                sh script: """$activatevirtualenv
 
                    hg revert kallithea/tests/test.ini
 
                    py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml
 
                    """, returnStatus: true
 
            } else {
 
                bat script: """$activatevirtualenv
 
                    py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml
 
                    """, returnStatus: true
 
@@ -86,13 +84,12 @@ node {
 
        }
 
    }
 
    if (isUnix()) {
 
        pytests['de'] = {
 
            ws {
 
                unstash name: 'kallithea'
 
                sh 'hg revert kallithea/tests/test.ini'
 
                withEnv(['LANG=de_DE.UTF-8',
 
                    'LANGUAGE=de',
 
                    'LC_ADDRESS=de_DE.UTF-8',
 
                    'LC_IDENTIFICATION=de_DE.UTF-8',
 
                    'LC_MEASUREMENT=de_DE.UTF-8',
 
                    'LC_MONETARY=de_DE.UTF-8',
 
@@ -111,13 +108,12 @@ node {
 
                junit 'pytest_de.xml'
 
            }
 
        }
 
        pytests['mysql'] = {
 
            ws {
 
                unstash name: 'kallithea'
 
                sh 'hg revert kallithea/tests/test.ini'
 
                sh """$activatevirtualenv
 
                    pip install --upgrade MySQL-python
 
                    """
 
                withEnv(['TEST_DB=mysql://kallithea:kallithea@jenkins_mysql/kallithea_test?charset=utf8']) {
 
                    if (isUnix()) {
 
                        sh script: """$activatevirtualenv
 
@@ -134,14 +130,12 @@ node {
 
                junit 'pytest_mysql.xml'
 
            }
 
        }
 
        pytests['postgresql'] = {
 
            ws {
 
                unstash name: 'kallithea'
 
                sh 'hg revert kallithea/tests/test.ini'
 
                sh 'sed -i.bak s/^sqlalchemy\\.url.*$/sqlalchemy.url=postgresql:\\\\/\\\\/kallithea:kallithea@jenkins_postgresql\\\\/kallithea_test/g kallithea/tests/test.ini'
 
                sh """$activatevirtualenv
 
                    pip install --upgrade psycopg2
 
                    """
 
                withEnv(['TEST_DB=postgresql://kallithea:kallithea@jenkins_postgresql/kallithea_test']) {
 
                    if (isUnix()) {
 
                        sh script: """$activatevirtualenv
0 comments (0 inline, 0 general)