Commit f60ab29c authored by Mehmet Kozan's avatar Mehmet Kozan

ci integration test commit.

parent bf8562c4
Pipeline #14826703 passed with stages
in 1 minute and 44 seconds
image: node:8.9.1
stages:
- build
- install
- test
- deploy
- version
- publish
- package
package_install:
stage: build
stage: install
script:
- pwd
- npm install --save --save-dev --save-exact
......@@ -20,37 +22,32 @@ mocha_test:
- npm run test
- echo "end of mocha_test script"
npm_package:
stage: deploy
version_check:
stage: version
only:
- master
script:
- pwd
- cd ..
- pwd
- git config --global user.email $GIT_EMAIL
- git config --global user.name $GIT_USER
- rm -rf npm_package_install
- mkdir npm_package_install
- cd npm_package_install
- npm install --prefix ./ crawler-url-parser
- cd node_modules
- cd crawler-url-parser
- npm install --save --save-dev --save-exact
- npm run test
- echo $CI_PROJECT_NAME
- REPO_VERSION=$(npm view $CI_PROJECT_NAME version)
- CURRENT_VERSION=$(node -p "require('./package.json').version")
- |
if [ "${REPO_VERSION}" -ne "${CURRENT_VERSION}" ]; then
echo "repo version not equalto current version"
if [ "${REPO_VERSION}" != "${CURRENT_VERSION}" ]; then
echo "repo version not equal to current version"
echo REPO_VERSION=${REPO_VERSION}
echo CURRENT_VERSION=${CURRENT_VERSION}
git tag "${CURRENT_VERSION}"
fi
- echo "end of npm_package script"
except:
- tags
- echo "end of version_check script"
npm_publish:
stage: deploy
stage: publish
only:
- tags
script:
......@@ -63,4 +60,33 @@ npm_publish:
- echo //registry.npmjs.org/:_authToken=$NPM_TOKEN
- echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > ~/.npmrc
- npm publish
- echo "end of npm_publish script"
\ No newline at end of file
- echo "end of npm_publish script"
package_test:
stage: package
only:
- tags
script:
- pwd
- cd ..
- pwd
- git config --global user.email $GIT_EMAIL
- git config --global user.name $GIT_USER
- echo $CI_PROJECT_NAME
- rm -rf npm_package_install
- mkdir npm_package_install
- cd npm_package_install
- npm install --prefix ./ crawler-url-parser
- cd node_modules
- cd crawler-url-parser
- REPO_VERSION=$(npm view $CI_PROJECT_NAME version)
- CURRENT_VERSION=$(node -p "require('./package.json').version")
- |
if [ "${REPO_VERSION}" == "${CURRENT_VERSION}" ]; then
echo "repo version equal to current version"
echo REPO_VERSION=${REPO_VERSION}
echo CURRENT_VERSION=${CURRENT_VERSION}
fi
- npm install --save --save-dev --save-exact
- npm run test
- echo "package_test"
\ No newline at end of file
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