Created
April 30, 2018 21:38
-
-
Save pb8226/0f8974f62094d2a72179d64b7f505bf9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
writing: { | |
cleanupOldServerFiles: function() { | |
cleanup.cleanupOldServerFiles(this, this.javaDir, this.testDir); | |
}, | |
writeGlobalFiles: function () { | |
this.template('_README.md', 'README.md', this, {}); | |
this.copy('gitignore', '.gitignore'); | |
this.copy('gitattributes', '.gitattributes'); | |
this.copy('editorconfig', '.editorconfig'); | |
this.template('_travis.yml', '.travis.yml', this, {}); | |
this.template('_Jenkinsfile', 'Jenkinsfile', this, {}); | |
}, | |
writeTerraformFiles: function () { | |
switch (this.terraform) { | |
case 'yes': | |
// Create Terraform module files | |
this.template(TERRAFORM_DIR + 'modules/backend-app/_main.tf', TERRAFORM_DIR + 'modules/backend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/backend-app/_vars.tf', TERRAFORM_DIR + 'modules/backend-app/vars.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/backend-app/_outputs.tf', TERRAFORM_DIR + 'modules/backend-app/outputs.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/frontend-app/_main.tf', TERRAFORM_DIR + 'modules/frontend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/frontend-app/_vars.tf', TERRAFORM_DIR + 'modules/frontend-app/vars.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/frontend-app/_outputs.tf', TERRAFORM_DIR + 'modules/frontend-app/outputs.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/postgres/_main.tf', TERRAFORM_DIR + 'modules/postgres/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/postgres/_vars.tf', TERRAFORM_DIR + 'modules/postgres/vars.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'modules/postgres/_outputs.tf', TERRAFORM_DIR + 'modules/postgres/outputs.tf', this, {}); | |
// Create Terraform prod files | |
this.template(TERRAFORM_DIR + 'prod/services/backend-app/_main.tf', TERRAFORM_DIR + 'prod/services/backend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'prod/services/frontend-app/_main.tf', TERRAFORM_DIR + 'prod/services/frontend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'prod/data-storage/postgresql/_main.tf', TERRAFORM_DIR + 'prod/data-storage/postgresql/main.tf', this, {}); | |
// Create Terraform stage files | |
this.template(TERRAFORM_DIR + 'stage/services/backend-app/_main.tf', TERRAFORM_DIR + 'stage/services/backend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'stage/services/frontend-app/_main.tf', TERRAFORM_DIR + 'stage/services/frontend-app/main.tf', this, {}); | |
this.template(TERRAFORM_DIR + 'stage/data-storage/postgresql/_main.tf', TERRAFORM_DIR + 'stage/data-storage/postgresql/main.tf', this, {}); | |
break; | |
case 'no': | |
default : | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment