1.2. buildspecファイルの作成¶
目的¶
buildspecファイルを作成します。
対象¶
- アプリケーションコード
パラメータ¶
パラメータの確認¶
変数の確認:
cat << ECHO # 0.1. DIR_APP:"${HOME}/environment/handson-cli" DIR_APP="${DIR_APP}" ECHO
実施¶
(タスク)
コマンド:
cat << 'EOF' > ${DIR_APP}/buildspec.yml version: 0.2 phases: pre_build: commands: # Discover and run unit tests. For more information, see <https://docs.pytest.org/en/latest/goodpractices.html> - python setup.py pytest artifacts: type: zip files: - 'template.yml' - 'scripts/**/*' - 'helloworld/**/*.py' - 'appspec.yml' - 'requirements.txt' - 'setup.py' EOF cat ${DIR_APP}/buildspec.yml
結果(例):
version: 0.2 phases: pre_build: commands: # Discover and run unit tests. For more information, see <https://docs.pytest.org/en/latest/goodpractices.html> - python setup.py pytest artifacts: type: zip files: - 'template.yml' - 'scripts/**/*' - 'helloworld/**/*.py' - 'appspec.yml' - 'requirements.txt' - 'setup.py'