From f442addcaf24619be7e667626a4a9d9942df723e Mon Sep 17 00:00:00 2001 From: Brent Anderson Date: Thu, 11 Apr 2019 15:16:34 -0500 Subject: [PATCH 1/2] Adds deploy files --- appspec.yml | 33 +++++++++++++++++++++++++++++++++ buildspec.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 appspec.yml create mode 100644 buildspec.yml diff --git a/appspec.yml b/appspec.yml new file mode 100644 index 0000000..1106b99 --- /dev/null +++ b/appspec.yml @@ -0,0 +1,33 @@ +# This is an appspec.yml template file for use with AWS CodeDeploy. +# The lines in this template starting with the hashtag symbol are +# instructional comments and can be safely left in the file or +# ignored. +# For help completing this file, see the "AppSpec File Reference" in the +# "AWS CodeDeploy User Guide" at +# http://docs.aws.amazon.com/codedeploy/latest/userguide/app-spec-ref.html +version: 0.0 +# Specify "os: linux" if this revision targets Amazon Linux, +# Red Hat Enterprise Linux (RHEL), or Ubuntu Server +# instances. +# Specify "os: windows" if this revision targets Windows Server instances. +# (You cannot specify both "os: linux" and "os: windows".) +os: linux +# os: windows +# During the Install deployment lifecycle event (which occurs between the +# BeforeInstall and AfterInstall events), copy the specified files +# in "source" starting from the root of the revision's file bundle +# to "destination" on the Amazon EC2 instance. +# Specify multiple "source" and "destination" pairs if you want to copy +# from multiple sources or to multiple destinations. +# If you are not copying any files to the Amazon EC2 instance, then remove the +# "files" section altogether. A blank or incomplete "files" section +# may cause associated deployments to fail. +files: + - source: / + destination: /var/www/fes2015-plus-enlightenment + +permissions: + - object: /var/www/es2015-plus-enlightenment + owner: root + group: root + mode: 755 diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000..9f82be3 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,36 @@ +version: 0.1 + +meta: | + AWS CodeBuild buildspec.yml + The dependencies are downloaded and the binary built outside of the GOPATH. + This requies special consideration is necessary. GOROOT is not set by default. + GOPATH is set to /go. GOBIN is necessary for the prebuild go get phase. + The repo source must be installed to the GOPATH. + +environment_variables: + plaintext: + PHASE: "build" + PROJECT: "feh-2019" + AWS_DEFAULT_REGION: "us-west-2" + +phases: + pre_build: + commands: + - echo PreBuild started on `date` + build: + commands: + - echo Build started on `date` + + post_build: + commands: + - echo build completed started on `date` + - mv open-in-web-browser.html index.html + +artifacts: + type: zip + files: + - assets/**/* + - index.html + - runJS.js + - appspec.yml + discard-paths: no From 384f55c5e1989f5a837498e18d04540d9ad66a18 Mon Sep 17 00:00:00 2001 From: Brent Anderson Date: Thu, 11 Apr 2019 15:37:29 -0500 Subject: [PATCH 2/2] Fix app target path --- appspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appspec.yml b/appspec.yml index 1106b99..e4cee0a 100644 --- a/appspec.yml +++ b/appspec.yml @@ -24,7 +24,7 @@ os: linux # may cause associated deployments to fail. files: - source: / - destination: /var/www/fes2015-plus-enlightenment + destination: /var/www/es2015-plus-enlightenment permissions: - object: /var/www/es2015-plus-enlightenment