Commit bf4e5fa3 authored by Anuj Gupta's avatar Anuj Gupta
Browse files

Merge branch 'feature/anuj/ibmcicd-seismic' into 'master'

Feature/anuj/ibmcicd seismic

See merge request !172
parents c3318f70 5be7404c
Pipeline #26024 passed with stage
in 18 seconds
variables:
REDIS_INSTANCE_PORT: 6380
ibm_deploy:
.ibm:
tags: ['osdu-medium']
image: openshift/origin-cli
stage: deploy
needs: ["compile-and-unit-test"]
environment:
name: IBM
variables:
IBM_OPENSHIFT_PROJECT: og-cicd
before_script:
- oc login $IBM_OPENSHIFT_URL -u apikey -p $IBM_OPENSHIFT_TOKEN
# - mkdir -p "$IBM_DEPLOY_DIR"
- oc login --token=$IBM_OPENSHIFT_TOKEN --server=$IBM_OPENSHIFT_URL
ibm-deploy:
extends: .ibm
stage: deploy
needs: ['compile-and-unit-test']
script:
# Replace values in config file
- echo "In IBM deploy"
- oc project $IBM_OPENSHIFT_PROJECT
- oc get bc/$CI_PROJECT_NAME 2> /dev/null || oc new-build --name $CI_PROJECT_NAME --binary --strategy source --image-stream openshift/nodejs:10-SCL
- oc start-build $CI_PROJECT_NAME --from-dir=. --follow
- oc get service $CI_PROJECT_NAME 2> /dev/null || oc new-app $CI_PROJECT_NAME
only:
variables:
- $IBM == 'true'
ibm_test:
.ibm_variables:
variables:
# Services
SEISMIC_HOST: $IBM_SEISMIC_HOST
# common security
KEYCLOAK_URL: $IBM_KEYCLOAK_URL
KEYCLOAK_REALM: OSDU
KEYCLOAK_CLIENT_ID: $IBM_KEYCLOAK_CLIENT_ID
KEYCLOAK_CLIENT_SECRET: $IBM_KEYCLOAK_CLIENT_SECRET
AUTH_USER_ACCESS: $IBM_AUTH_USER_ACCESS
AUTH_USER_ACCESS_PASSWORD: $IBM_AUTH_USER_ACCESS_PASSWORD
ibm-test:
tags: ["osdu-medium"]
image: node
stage: integration
needs: ["ibm_deploy"]
extends:
- .ibm_variables
allow_failure: true
needs: ["ibm-deploy"]
script:
# Replace values in config file
- echo "test"
- apt-get update
- apt-get install -y python
- apt-get install -y python-pip
- pip install requests
- svctoken=$(python devops/scripts/ibm_jwt_client.py)
- echo $svctoken
- npm install -g newman
- chmod +x ./tests/e2e/run_e2e_tests.sh
- ./tests/e2e/run_e2e_tests.sh --seistore-svc-url="https://${SEISMIC_HOST}/api/v3" --seistore-svc-api-key="NA" --user-idtoken="$svctoken" --user1-idtoken="$svctoken" --tenant="${E2E_TENANT}" --subproject="${E2E_SUBPROJECT}" --admin-email="${E2E_ADMIN_EMAIL}" --datapartition="${E2E_DATA_PARTITION}" --legaltag01="${E2E_LEGALTAG01}" --legaltag02="${E2E_LEGALTAG02}" --subproject-long-name="${E2E_SUBPROJECT_LONG_NAME}" --VCS-Provider="ibm"
only:
variables:
- $IBM == 'true'
\ No newline at end of file
- $IBM == 'true'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment