- }
-
- function node_build(){
- chmod -R 777 node_modules
- npm run ${1:-"build"}
- find dist -name '*.js' | xargs sed -i "s/localhost:version/$CI_COMMIT_TAG/g"
- }
-
- function docker_build(){
- cp -r /cache/${CI_PROJECT_NAME}-${CI_PROJECT_ID}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}/* ${1:-"."}
- docker login -u ${DOCKER_USER} -p ${DOKCER_PWD} ${DOCKER_REGISTRY}
- docker build --pull -t ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG} ${1:-"."}
- docker push ${DOCKER_REGISTRY}/${GROUP_NAME}/${PROJECT_NAME}:${CI_COMMIT_TAG}
- }
-
- before_script:
- - *auto_devops