Skip to content

Commit

Permalink
Merge pull request #434 from aws-solutions/release/v6.1.1
Browse files Browse the repository at this point in the history
chore(release): 6.1.1
  • Loading branch information
dougtoppin authored Feb 1, 2023
2 parents 7d2ad04 + d5f9f5d commit b2e0871
Show file tree
Hide file tree
Showing 41 changed files with 34,219 additions and 73 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/workflows/ @aws-solutions/sb-csne
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


**Checklist**
- [ ] :wave: I have added unit tests for all code changes.
- [ ] :wave: I have run the unit tests, and all unit tests have passed.
- [ ] :warning: This pull request might incur a breaking change.

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cdk-nag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Workflow that runs unit test
name: CDK Nag Test

on:
push:
branches:
- '*'
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
cdk-nag:
name: CDK Nag Check
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
cd source/constructs && npm i --only=dev
npx cdk synth
22 changes: 0 additions & 22 deletions .github/workflows/close_inactive_issues.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/code-style-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Workflow that runs prettier code style check.
name: Code Style and Lint

on:
push:
branches:
- '*'
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
prettier:
name: Style Check
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- run: npx --y prettier --config source/.prettierrc.yml --check 'source/**/*.ts'
linter:
name: Lint Check
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
cd source && npm i
npx --y eslint . --ext .ts
24 changes: 24 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Security Scans

on:
push:
branches:
- '*'
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
codeql:
name: CodeQL Check
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ javascript, typescript ]
steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- uses: github/codeql-action/analyze@v2
26 changes: 26 additions & 0 deletions .github/workflows/pipeline-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pipeline Workflow

env:
REGION: us-east-1

on: push

jobs:
pipeline-job:
name: Pipeline Job
if: github.repository_owner == 'aws-solutions'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.DISPATCHER_ROLE_ARN }}
aws-region: ${{ env.REGION }}
role-duration-seconds: 900
role-session-name: OIDCSession
- name: Run CodeBuild
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{ secrets.DISPATCHER_CODEBUILD_PROJECT_NAME }}
26 changes: 26 additions & 0 deletions .github/workflows/pull-request-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pull Request Workflow

on:
push:
branches:
- '*'
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
pull-request-job:
name: Status Checks
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Viperlight
run: |
wget -q https://viperlight-scanner.s3.amazonaws.com/latest/viperlight.zip
unzip -q viperlight.zip -d ../viperlight
rm -r ./viperlight.zip
echo "Content scanning utility installation complete `date`"
echo "Starting content scanning `date` in `pwd`"
../viperlight/bin/viperlight scan -m files-contents -m files-aws -m files-binary -m files-entropy -m files-secrets
echo "Completed content scanning `date`"
26 changes: 26 additions & 0 deletions .github/workflows/run-unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Workflow that runs unit test
name: Unit Test

on:
push:
branches:
- '*'
pull_request:
types: [opened, edited, reopened, synchronize]

jobs:
unittest:
name: Unit Test Check
if: ${{ (github.repository_owner != 'aws-solutions' && github.event_name == 'push') || (github.repository_owner == 'aws-solutions' && github.event_name == 'pull_request') }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
cd deployment
chmod +x ./run-unit-tests.sh && DEBUG=true ./run-unit-tests.sh
22 changes: 22 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close Stale Issues and PRs

on:
schedule:
- cron: "0 0 * * *"

jobs:
close-issues:
name: Close Stale Issues
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v3
with:
days-before-stale: 90
days-before-close: 7
stale-issue-message: This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
close-issue-message: This issue was closed because it has been inactive for 7 days since being marked as stale.
stale-pr-message: This pr has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
close-pr-message: This pr was closed because it has been inactive for 7 days since being marked as stale.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ demo-ui-config.js
# System Files
**/.DS_Store
**/.vscode
**/.idea
5 changes: 5 additions & 0 deletions .viperlightignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/*
CONTRIBUTING.md:46
CODE_OF_CONDUCT.md:4
coverage/*
.zip
4 changes: 4 additions & 0 deletions .viperlightrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"all": true,
"failOn": "medium"
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.1.1] - 2023-02-02

### Added

- package-lock.json for all modules [#426](https://github.com/aws-solutions/serverless-image-handler/pull/426)
- github workflows for running unit test, eslint and prettier formatting, cdk nag, security scans [#402](https://github.com/aws-solutions/serverless-image-handler/pull/402)
- demo-ui unicode support [#416](https://github.com/aws-solutions/serverless-image-handler/issues/416)

### Changed

- axios version update to 1.2.3 [#425](https://github.com/aws-solutions/serverless-image-handler/pull/425)
- json5 version update to 1.0.2 [#428](https://github.com/aws-solutions/serverless-image-handler/pull/428)
- CodeQL advisory resolutions
- contributing guidelines

## [6.1.0] - 2022-11-10

### Added
Expand Down
27 changes: 17 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,34 @@ When filing an issue, please check [existing open](https://github.com/aws-soluti

- A reproducible test case or series of steps
- The version of our code being used
- The region being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment

## Contributing via Pull Requests

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the _main_ branch.
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
1. You are working against the latest source on the _develop_ branch.
1. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
1. You open an issue to discuss any significant work - we would hate for your time to be wasted.
1. Note that the head of the develop branch contains latest features being developed for the solution.
1. Changes in this branch will be unstable and are not recommended for production deployments.

To send us a pull request, please:

1. Fork the repository.
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3. Ensure local tests pass.
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
1. Modify the source; please focus on the specific change you are contributing.
1. Add new unit tests for the new code.
1. Run _npx npm run prettier-format_ in _source_ to ensure that code format standards are maintained.
1. If your changes include new capabilities, include in the PR description text that can be folded into the solution documentation.
1. Commit to your fork using clear commit messages.
1. Ensure that github Actions pass for all Required tasks.
1. In your repository _Security_ section, ensure that security advisories are enabled and address any Dependabot issues that appear.
1. Send us a pull request, answering any default questions in the pull request interface.
1. If the changes are complex or may involve additional communication, we may create a feature branch specific to your PR and ask you to rebase using that branch.

GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

## Finding contributions to work on

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In addition to the AWS Solutions Constructs, the solution uses AWS CDK directly
## Prerequisites for Customization

- [AWS Command Line Interface](https://aws.amazon.com/cli/)
- Node.js 14.x or later
- Node.js 16.x or later

### 1. Clone the repository

Expand Down
35 changes: 35 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 0.2

phases:
install:
runtime-versions:
nodejs: 16
pre_build:
commands:
- npm install -g [email protected]
- echo "Installing dependencies and executing unit tests - `pwd`"
- cd deployment && chmod +x ./run-unit-tests.sh && ./run-unit-tests.sh
- echo "Installing dependencies and executing unit tests completed `date`"
build:
commands:
- echo "Starting build `date` in `pwd`"
- chmod +x ./build-s3-dist.sh && ./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION
- echo "Build completed `date`"
- echo "Starting open-source-dist `date` in `pwd`"
- chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME
- echo "Open Source Dist completed `date`"
post_build:
commands:
- echo "Retrieving next stage buildspec `date` in `pwd`"
- aws s3 cp s3://solutions-build-assets/changelog-spec.yml ../buildspec.yml
- echo "Retrieving next stage buildspec complete"
- echo "Post build completed on `date`"

artifacts:
files:
- deployment/**/*
- source/**/*
- CHANGELOG.md
- buildspec.yml
- sonar-project.properties
- .gitignore
Loading

0 comments on commit b2e0871

Please sign in to comment.