cfhighlander 0.9.0.alpha.1557217276 → 0.9.0.alpha.1558836434
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -8
- data/cfndsl_ext/lambda_helper.rb +7 -1
- data/lib/cfhighlander.tests.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cd05739614c22a021497ca79ff403e1a0e77087dd3ed49bd376c47ef2d44b24
|
4
|
+
data.tar.gz: a3b5757ddbebda6f389225de6b73632588052003d631ffb4c765a9d3ebdf8a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4ea15e1e0b2c7f7ac46260f50ec1df7b458ffd26e9e68304458cadbaad6417d5e19801956eb799c78e5e6676ef53531ca431f04d48f2ab875316e75e185740
|
7
|
+
data.tar.gz: f41f2353cdcd86f0ed6c3218503da4cf41884f35fe8624a8259f7d49cf33c6fe9df70bf5ac1205e10284497dbf086ae3fff479f6152b6a104ad36c1b7cd2e1ab
|
data/README.md
CHANGED
@@ -660,7 +660,7 @@ Cfhighlander supports following in terms of lambda source code management
|
|
660
660
|
- Package and deploy lambda that has source code published to http(s) url
|
661
661
|
- Package and deploy lambda with absolute source code location, or relative to component
|
662
662
|
root directory
|
663
|
-
- When extending certain highlander component, of
|
663
|
+
- When extending certain highlander component, of
|
664
664
|
- Execute arbitrary 'package command' before creating final archive. This allows for downloading
|
665
665
|
code dependencies
|
666
666
|
|
@@ -736,6 +736,12 @@ highlanderdocoexample:
|
|
736
736
|
# if you don't want to get prompted for every command execution use -q (quiet) option
|
737
737
|
package_cmd: 'pip3 install -r requirements.txt -t .'
|
738
738
|
|
739
|
+
# creates a log group with cloudformation and sets the retention period in days
|
740
|
+
# if not set lambda will create the log group with a unlimited retention
|
741
|
+
# note that if lambda has already created a log group, it will need to be deleted
|
742
|
+
# before this can be updated.
|
743
|
+
log_retention: 30
|
744
|
+
|
739
745
|
# (optional) allowed source. e.g. invocation using SNS
|
740
746
|
# for every allowed source, source_arn can be provided optionally
|
741
747
|
allowed_sources:
|
@@ -757,22 +763,22 @@ highlanderdocoexample:
|
|
757
763
|
During cfhighlander compilation process, every defined lambda functio goes through process
|
758
764
|
of packaging:
|
759
765
|
|
760
|
-
- If s3 URI or http(s) uri is given as function code, it is being downloaded
|
766
|
+
- If s3 URI or http(s) uri is given as function code, it is being downloaded
|
761
767
|
- Temporary packaging directory is created
|
762
768
|
- If `package_cmd` key is given, this command is being executed in temporary directory
|
763
|
-
- Whole temporary directory is compressed and moved to `out/lambdas/$function.$timestamp.zip`
|
764
|
-
- Sha256 hash is calculated for given file and rendered into cloudformation as function
|
769
|
+
- Whole temporary directory is compressed and moved to `out/lambdas/$function.$timestamp.zip`
|
770
|
+
- Sha256 hash is calculated for given file and rendered into cloudformation as function
|
765
771
|
version
|
766
|
-
- Packaging information is rendered into `out/lambdas/$function.$timestamp.zip.info.yaml`
|
772
|
+
- Packaging information is rendered into `out/lambdas/$function.$timestamp.zip.info.yaml`
|
767
773
|
and added to final archive
|
768
|
-
|
774
|
+
|
769
775
|
Any archive with `*.zip` extension will be uploaded to s3 with `cfpublish` command
|
770
776
|
|
771
777
|
|
772
778
|
#### Referencing
|
773
779
|
|
774
|
-
As all of the lambda functions are rendered as cloudformation resources, they can be
|
775
|
-
referenced in other blocks. E.g. with example above, application component could have
|
780
|
+
As all of the lambda functions are rendered as cloudformation resources, they can be
|
781
|
+
referenced in other blocks. E.g. with example above, application component could have
|
776
782
|
following output defined in component's cfndsl file
|
777
783
|
|
778
784
|
```ruby
|
data/cfndsl_ext/lambda_helper.rb
CHANGED
@@ -101,6 +101,12 @@ def render_lambda_functions(cfndsl, lambdas, lambda_metadata, distribution)
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
-
|
104
|
+
if lambda_config.has_key?('log_retention')
|
105
|
+
Logs_LogGroup("#{name}LogGroup") do
|
106
|
+
LogGroupName "/aws/lambda/#{name}"
|
107
|
+
RetentionInDays lambda_config['log_retention'].to_i
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
105
111
|
end
|
106
112
|
end
|
data/lib/cfhighlander.tests.rb
CHANGED
@@ -34,7 +34,7 @@ module CfHighlander
|
|
34
34
|
|
35
35
|
def load_default_config
|
36
36
|
begin
|
37
|
-
YAML.
|
37
|
+
YAML.load_file("#{@component_name}.config.yaml") || {}
|
38
38
|
rescue Errno::ENOENT => e
|
39
39
|
{}
|
40
40
|
end
|
@@ -42,7 +42,7 @@ module CfHighlander
|
|
42
42
|
|
43
43
|
def load_test_case(file)
|
44
44
|
begin
|
45
|
-
YAML.
|
45
|
+
YAML.load_file(file)
|
46
46
|
rescue Errno::ENOENT => e
|
47
47
|
abort "No test file found for #{file}"
|
48
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfhighlander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0.alpha.
|
4
|
+
version: 0.9.0.alpha.1558836434
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Tosic
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-05-
|
13
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: highline
|