diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 36a031b..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,86 +0,0 @@ -stages: - - pre-build - - pre-build-test - - push-artifacts - - performance - -variables: - DOMAIN_NAME: oecloud.local - PERF_DOMAIN_NAME: oecloud.perf - REGISTRY: registry.${DOMAIN_NAME} - EXECUTOR_IMAGE: oecloud-executor:12.x - EXECUTOR_IMAGE_ORACLE: debian-node-oracle-docker:12.x - -image: ${REGISTRY}/${EXECUTOR_IMAGE} - -before_script: - - export project=${CI_PROJECT_NAME//[^[:alnum:]]/} - - export group=${CI_PROJECT_NAMESPACE//[^[:alnum:]]/} - - export branch=${CI_BUILD_REF_NAME//[^[:alnum:]]/} - - if [ ${group} == "oecloudio" ]; then export APP_IMAGE_NAME=$project; else export APP_IMAGE_NAME=$group"-"$project; fi - - export APP_IMAGE_NAME=$(echo $APP_IMAGE_NAME | tr '[:upper:]' '[:lower:]') - - if [ ${branch} == "master" ]; then export APP_TAG=latest; else export APP_TAG=${branch}; fi - - export APP_TAG=$(echo $APP_TAG | tr '[:upper:]' '[:lower:]') - - - npm config set unsafe-perm true - - npm config set progress false - - npm config set registry ${NPM_REGISTRY} - # - npm config set registry https://registry.npmjs.org/ - -npminstall: - stage: pre-build - script: - - echo "Performing code style check..." - - export status_eslint=0 - - export exit_status=0 - - time npm install eslint babel-eslint eslint-config-loopback --no-optional - - if npm run lint; then status_eslint=0; else status_eslint=1; fi - - if [ $status_eslint == 1 ]; then export exit_status=1 && echo "esLint errors exist"; fi - - if [ $exit_status == 1 ]; then exit $exit_status; fi - - echo "Code style check done successfully" - - time npm install --no-optional - - echo "Node Modules Installed" - - npm config rm registry - - npm audit --json > vulnerabilities.json || true - - if npm audit; then status_vulnerabilities=0; else status_vulnerabilities=1; fi - - if [ $status_vulnerabilities == 1 ]; then echo "Dependency vulnerabilities exist"; fi - - if [ $exit_status == 1 ]; then exit $exit_status; fi - artifacts: - expire_in: 2h - paths: - - node_modules/ - - vulnerabilities.json - tags: - - CEP_RUNNER - -mongotest: - coverage: /Statements.*?(\d+(?:\.\d+)?)%/ - stage: pre-build-test - variables: - MONGODB_HOST: 10.73.53.144 - MONGODB_PORT: '27017' - MONGODB_DATABASE: ${CI_JOB_ID}_mongo - script: - - echo 'Performing MongoDB Test' - - time npm install --no-optional - - npm test - artifacts: - expire_in: 2h - paths: - - coverage/ - tags: - - CEP_RUNNER - -pushartifacts: - stage: push-artifacts - script: - - echo "Copying all artifacts" - - mkdir -p ./artifacts/${CI_PROJECT_NAME}/${CI_BUILD_REF_NAME}/ - - cp vulnerabilities.json ./artifacts/${CI_PROJECT_NAME}/${CI_BUILD_REF_NAME}/ - - cp -r coverage/ ./artifacts/${CI_PROJECT_NAME}/${CI_BUILD_REF_NAME}/ - - git clone http://10.73.97.24/oecloud.io/build-tools.git - - sh ./build-tools/push_artifacts.sh - tags: - - CEP_RUNNER - only: - - /^.*/@oecloud.io/oe-connector-mongodb