-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from theonestack/feature/ecs-service-tasks
brings task def features inline with the ecs-services component
- Loading branch information
Showing
13 changed files
with
642 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: cftest | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up ruby 2.7 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7.x | ||
- name: install gems | ||
run: gem install cfhighlander rspec | ||
- name: set cfndsl spec | ||
run: cfndsl -u | ||
- name: cftest | ||
run: rspec | ||
env: | ||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ap-southeast-2 |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
# hl-component-ecs-task | ||
![cftest](https://github.com/theonestack/hl-component-ecs-task/actions/workflows/rspec.yaml/badge.svg) | ||
|
||
### Cfhighlander ECS Task component | ||
|
||
```bash | ||
|
||
# install highlander gem | ||
$ gem install cfhighlander | ||
|
||
# build and validate standalone component | ||
$ cfhighlander cfcompile --validate ecs-task | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
TBD | ||
|
||
### Configuration options | ||
|
||
TBD | ||
|
||
### Outputs | ||
|
||
TBD |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require 'yaml' | ||
|
||
describe 'compiled component' do | ||
|
||
context 'cftest' do | ||
it 'compiles test' do | ||
expect(system("cfhighlander cftest #{@validate} --tests tests/default.test.yaml")).to be_truthy | ||
end | ||
end | ||
|
||
let(:template) { YAML.load_file("#{File.dirname(__FILE__)}/../out/tests/default/ecs-task.compiled.yaml") } | ||
|
||
context 'Resources' do | ||
it 'has No Task ' do | ||
expect(template["Resources"]['Task']).to eq(nil) | ||
end | ||
|
||
it 'has a Log Group' do | ||
expect(template["Resources"]['LogGroup']).to eq({ | ||
"Type"=>"AWS::Logs::LogGroup", | ||
"Properties"=>{"LogGroupName"=>{"Ref"=>"AWS::StackName"}, "RetentionInDays"=>"7"} | ||
}) | ||
end | ||
end | ||
|
||
end |
Oops, something went wrong.