Skip to content

Commit

Permalink
chore: fix db path
Browse files Browse the repository at this point in the history
  • Loading branch information
adeldhis2 committed Nov 5, 2024
1 parent 3cc31c2 commit 7face0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jenkinsfiles/trigger-external-tests
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pipeline {
dir('scripts/databases') {
env.DATABASE_ID = sh(
returnStdout: true,
script: "./list.sh | jq -r '.[] | select(.name == \"$DATABASE_GROUP_NAME\") .databases[] | select(.name == \"${DB_VERSION_TAG}.sql.gz\") .id'"
script: "./list.sh | jq -r '.[] | select(.name == \"$DATABASE_GROUP_NAME\") .databases[] | select(.name == \"sierra-leone/${DB_VERSION_TAG}.sql.gz\") .id'"
).trim()

if (!env.DATABASE_ID) {
Expand All @@ -85,15 +85,15 @@ pipeline {
try {
env.DATABASE_ID = sh(
returnStdout: true,
script: "./upload.sh $DATABASE_GROUP_NAME \"${DB_VERSION_TAG}.sql.gz\" ${DB_VERSION_TAG}.sql.gz | jq -r '.id'"
script: "./upload.sh $DATABASE_GROUP_NAME \"sierra-leone/${DB_VERSION_TAG}.sql.gz\" ${DB_VERSION_TAG}.sql.gz | jq -r '.id'"
).trim()
} catch (err) {
echo "Couldn't download or upload database for ${DB_VERSION_TAG}: ${err}"

DHIS2_SHORT_VERSION = DB_VERSION_TAG.split('\\.').take(2).join('.')
env.DATABASE_ID = sh(
returnStdout: true,
script: "./list.sh | jq -r '.[] | select(.name == \"$DATABASE_GROUP_NAME\") .databases[] | select(.name == \"${DHIS2_SHORT_VERSION}.sql.gz\") .id'"
script: "./list.sh | jq -r '.[] | select(.name == \"$DATABASE_GROUP_NAME\") .databases[] | select(.name == \"sierra-leone/${DHIS2_SHORT_VERSION}.sql.gz\") .id'"
).trim()
}
}
Expand Down Expand Up @@ -133,6 +133,7 @@ pipeline {
stage('Trigger Cypress Tests') {
steps {
script {
// def repos = ['dhis2/line-listing-app', 'dhis2/data-visualizer-app', 'dhis2/aggregate-data-entry-app', 'dhis2/dashboard-app', 'dhis2/capture-app', 'dhis2/maps-app', 'dhis2/user-app']
def repos = ['dhis2/line-listing-app', 'dhis2/aggregate-data-entry-app']
def payload = [
dhis2_version: env.DOCKER_IMAGE_TAG,
Expand Down

0 comments on commit 7face0d

Please sign in to comment.