-
Notifications
You must be signed in to change notification settings - Fork 0
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 #72 from d-rec/improve-linter-setup
Add more linters
- Loading branch information
Showing
11 changed files
with
148 additions
and
76 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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
[*] | ||
# Ensure consistent file encoding in UNIX style | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
end_of_line = lf |
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,40 @@ | ||
# Generic checks to ease collaboration: | ||
# - consistent file encoding in UNIX style | ||
# - whitespaces in all purposes files like markdown, yaml, etc | ||
name: Check Generic | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
editorconfig-checker: | ||
name: Run editorconfig-checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run editorconfig-checker | ||
run: docker run --rm --volume=$PWD:/check mstruebing/editorconfig-checker | ||
|
||
markdownlint: | ||
name: Run markdownlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run markdownlint-cli2 | ||
uses: DavidAnson/markdownlint-cli2-action@v13 | ||
|
||
yamllint: | ||
name: Run yamllint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run yamllint | ||
run: yamllint . |
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,14 @@ | ||
# Disable some built-in rules | ||
config: | ||
line-length: false | ||
no-inline-html: false | ||
first-line-h1: false | ||
code-fence-style: | ||
style: backtick | ||
|
||
# Define glob expressions to use (only valid at root) | ||
globs: | ||
- "**/*.md" | ||
|
||
# Ignore files that are not part of version control | ||
gitignore: true |
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,4 +1,12 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} | ||
"trailingComma": "all", | ||
"overrides": [ | ||
{ | ||
"files": "*.{yaml,yml}", | ||
"options": { | ||
"singleQuote": false | ||
} | ||
} | ||
] | ||
} |
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,18 @@ | ||
extends: default | ||
|
||
ignore-from-file: | ||
- .gitignore | ||
- .yamllintignore | ||
|
||
rules: | ||
document-start: disable | ||
indentation: | ||
spaces: 2 | ||
line-length: disable | ||
quoted-strings: | ||
quote-type: double | ||
required: only-when-needed | ||
allow-quoted-quotes: true | ||
check-keys: true | ||
truthy: | ||
check-keys: false |
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 @@ | ||
pnpm-lock.yaml |
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,5 +1,6 @@ | ||
# DRec UI CHANGELOG.md | ||
|
||
## 0.0.1 | ||
|
||
- Dockerfile and buildspec.yml changes | ||
- CICD testing | ||
- CICD testing |
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,35 +1,35 @@ | ||
version: 0.2 | ||
env: | ||
parameter-store: | ||
docker_username: /powertrust/docker/username | ||
docker_password: /powertrust/docker/password | ||
phases: | ||
install: | ||
# runtime-versions: | ||
# nodejs: 18 | ||
# docker: 18 | ||
commands: | ||
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 & | ||
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done" | ||
- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
- chmod +x ./kubectl | ||
- curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64 | ||
- chmod +x ./aws-iam-authenticator | ||
- export PATH=$PWD/:$PATH | ||
pre_build: | ||
commands: | ||
- IMAGE="drec-ui" | ||
- BUILD_NUMBER=$(cat version) | ||
- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 895706603967.dkr.ecr.eu-west-1.amazonaws.com | ||
- export KUBECONFIG=$HOME/.kube/config | ||
build: | ||
commands: | ||
- echo $docker_password | docker login --username $docker_username --password-stdin | ||
- docker build -t $IMAGE:$BUILD_NUMBER -f Dockerfile --build-arg build_environment=$environment . | ||
- docker tag $IMAGE:$BUILD_NUMBER 895706603967.dkr.ecr.eu-west-1.amazonaws.com/$IMAGE:$environment-$BUILD_NUMBER | ||
post_build: | ||
commands: | ||
- docker push 895706603967.dkr.ecr.eu-west-1.amazonaws.com/$IMAGE:$environment-$BUILD_NUMBER | ||
- aws eks update-kubeconfig --name drec | ||
- template=`cat "$IMAGE-$environment.yaml" | sed "s/{{BUILD_NUMBER}}/$environment-$BUILD_NUMBER/g"` | ||
- echo "$template" | kubectl apply -f - | ||
version: 0.2 | ||
env: | ||
parameter-store: | ||
docker_username: /powertrust/docker/username | ||
docker_password: /powertrust/docker/password | ||
phases: | ||
install: | ||
# runtime-versions: | ||
# nodejs: 18 | ||
# docker: 18 | ||
commands: | ||
- nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://127.0.0.1:2375 --storage-driver=overlay2 & | ||
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done" | ||
- curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
- chmod +x ./kubectl | ||
- curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64 | ||
- chmod +x ./aws-iam-authenticator | ||
- export PATH=$PWD/:$PATH | ||
pre_build: | ||
commands: | ||
- IMAGE="drec-ui" | ||
- BUILD_NUMBER=$(cat version) | ||
- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 895706603967.dkr.ecr.eu-west-1.amazonaws.com | ||
- export KUBECONFIG=$HOME/.kube/config | ||
build: | ||
commands: | ||
- echo $docker_password | docker login --username $docker_username --password-stdin | ||
- docker build -t $IMAGE:$BUILD_NUMBER -f Dockerfile --build-arg build_environment=$environment . | ||
- docker tag $IMAGE:$BUILD_NUMBER 895706603967.dkr.ecr.eu-west-1.amazonaws.com/$IMAGE:$environment-$BUILD_NUMBER | ||
post_build: | ||
commands: | ||
- docker push 895706603967.dkr.ecr.eu-west-1.amazonaws.com/$IMAGE:$environment-$BUILD_NUMBER | ||
- aws eks update-kubeconfig --name drec | ||
- template=`cat "$IMAGE-$environment.yaml" | sed "s/{{BUILD_NUMBER}}/$environment-$BUILD_NUMBER/g"` | ||
- echo "$template" | kubectl apply -f - |
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