You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update the layer version in *config/version.go*.
35
-
* Use below command for creating and deploying layer
36
-
37
-
cd scripts/
38
-
sh zip.sh
32
+
- Go to root folder and run "go test ./..."
39
33
34
+
- Go to lambda-extensions folder and run "go test ./..."
40
35
41
-
## Integration Testing (Manual)
36
+
2> Testing with Lambda function
42
37
43
-
Add your layer to lambda by following [docs](https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Collect_Logs_from_AWS_Lambda_using_Lambda_Extension) and test the function manually. Confirm that logs are coming to Sumo Logic.
38
+
Add the layer arn generated from build command output to your lambda function by following instructions in [docs](https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Collect_AWS_Lambda_Logs_using_an_Extension).Test by running the function manually. Confirm that logs are coming to Sumo Logic.
39
+
40
+
## Releasing the layers
41
+
1. Change the *AWS_PROFILE* environment variable using below command. The profile should point to sumocontent aws account.
42
+
`export AWS_PROFILE=<sumo content profile>`
43
+
1. Update the layer version in *config/version.go*.
44
+
1. Go to scripts folder
45
+
`cd scripts/`
46
+
1. Change the layer_name variable in zip.sh to avoid replacing the prod.
47
+
1. Run below command
48
+
`sh zip.sh`
49
+
50
+
### Github Release
51
+
52
+
- The new extension binary and zip files gets released automatically after the tags are pushed using Github actions(Refer tagged-release in https://github.com/marvinpinto/action-automatic-releases).
53
+
54
+
Run below commands to create and push tags
55
+
56
+
git tag -a v<major.minor.patch> <commit_id>
57
+
58
+
git push origin v<major.minor.patch>
59
+
60
+
- Add the sumologic-extension-amd64.tar.gz and sumologic-extension-arm64.tar.gz files manually from the target folder generated after running zip.sh.
61
+
- Update the release description with new layer arns and more details on what's changed.
62
+
63
+
64
+
### Upgrading to new golang versions
65
+
1. Make sure to install new go version. Preferably use [gvm](https://github.com/moovweb/gvm).
66
+
1. Update golang version in `go.mod` or run command `go mod edit -go <version ex 1.22>`.
67
+
1. Run `go mod tidy`. This will update `go.sum` file and clean up unwanted dependencies.
68
+
1. Install `golangci-lint` by running command `brew install golangci-lint`. Go to `lambda-extensions` directory and run `golangci-lint run`, this will check for deprecated methods. Check enabled linters using `golangci-lint linters` command.
69
+
1. Install `govulncheck` by running command `go install golang.org/x/vuln/cmd/govulncheck@latest` and run `~/go/bin/govulncheck -mode=binary target/amd64/extensions/sumologic-extension`. this will find common security issues.
- Change the layer_name variable in zip.sh to avoid replacing the prod.
76
-
- Run below command
77
-
`sh zip.sh`
78
-
79
-
## Release
80
-
Releasing new layer versions
81
-
82
-
- Go to scripts folder
83
-
- Export Profile export AWS_PROFILE=<sumocontentprofile>. The profile should point to sumocontnet aws account.
84
-
- Run below command
85
-
`sh zip.sh`
86
-
87
-
88
-
- The new extension binary and zip files gets released automatically after the tags are pushed using Github actions(Refer tagged-release in https://github.com/marvinpinto/action-automatic-releases).
89
-
90
-
Run below commands to create and push tags
91
-
92
-
git tag -a v<major.minor.patch> <commit_id>
93
-
94
-
git push origin v<major.minor.patch>
95
-
96
-
- Add the sumologic-extension-amd64.tar.gz and sumologic-extension-arm64.tar.gz files manually from the target folder generated after running zip.sh.
97
-
- Update the release description with new layer arns and more details on what's changed.
98
-
99
-
## Testing
100
-
101
-
1> Unit Testing locally
102
-
103
-
- Go to root folder and run "go test ./..."
104
-
105
-
- Go to lambda-extensions folder and run "go test ./..."
106
-
107
-
2> Testing with Lambda function
108
-
109
-
Add the layer arn generated from build command output to your lambda function by following instructions in [docs](https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Collect_AWS_Lambda_Logs_using_an_Extension).
0 commit comments