Amazon web services 如何在CodeDeploy buildspec文件上使用gulp?
以下是我的构建规范文件:Amazon web services 如何在CodeDeploy buildspec文件上使用gulp?,amazon-web-services,aws-codebuild,Amazon Web Services,Aws Codebuild,以下是我的构建规范文件: # 0.1 : shell for each command # 0.2 : shell keeps its settings # https://stackoverflow.com/a/45115791/28004 version: 0.2 phases: install: commands: - echo INSTALL started on `date` - cd wp-content/themes/sitecampaig
# 0.1 : shell for each command
# 0.2 : shell keeps its settings
# https://stackoverflow.com/a/45115791/28004
version: 0.2
phases:
install:
commands:
- echo INSTALL started on `date`
- cd wp-content/themes/sitecampaign-sage
- echo `pwd`
- npm install bower -g
- npm install grunt -g
- npm install gulp -g
- echo INSTALL completed on `date`
pre_build:
commands:
- echo PRE_BUILD started on `date`
- echo `pwd`
- bower -v
- node -v
- npm -v
- gulp -v
- gulp default
- echo PRE_BUILD completed on `date`
build:
commands:
- echo BUILD started on `date`
- echo `pwd`
# - gulp
- echo BUILD completed on `date`
post_build:
commands:
- echo POST_BUILD started on `date`
- echo `pwd`
- rm -rf node_modules
- rm -rf bower_components
- echo POST_BUILD completed on `date`
artifacts:
files:
- /**/*
discard-paths: no
但是,即使gulp-v返回正确的gulp版本,运行gulp或gulp default gulp也会说gulp没有安装
我错过了什么?有人有相同的问题吗?忘记了运行npm安装和bower安装。。。为了更多地关注工具本身,我忘记了简单地运行日常命令
最终文件规格:
# 0.1 : shell for each command
# 0.2 : shell keeps its settings
# https://stackoverflow.com/a/45115791/28004
version: 0.2
phases:
install:
commands:
- echo INSTALL started on `date`
- cd wp-content/themes/sitecampaign-sage
- echo `pwd`
- npm install bower -g
- npm install grunt -g
- npm install gulp -g
- npm install
- bower install --allow-root
- echo INSTALL completed on `date`
pre_build:
commands:
- echo PRE_BUILD started on `date`
- echo `pwd`
- bower -v
- node -v
- npm -v
- gulp -v
- which gulp
- echo PRE_BUILD completed on `date`
build:
commands:
- echo BUILD started on `date`
- echo `pwd`
- which gulp
- gulp default
- echo BUILD completed on `date`
post_build:
commands:
- echo POST_BUILD started on `date`
- echo `pwd`
- rm -rf node_modules
- rm -rf bower_components
- echo POST_BUILD completed on `date`
artifacts:
files:
- /**/*
可能重复的