Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vidya reddy/prettier code #62

Merged
merged 18 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report-feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: Create a report to help us improve
title: ''
labels: need-to-triage
assignees: ''

---


50 changes: 25 additions & 25 deletions .github/workflows/defaultLabels.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: setting-default-labels

on:
schedule:
- cron: "0 0/3 * * *"
schedule:
- cron: '0 0/3 * * *'

jobs:
label-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
name: Setting issue as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is idle because it has been open for 14 days with no activity.'
stale-issue-label: 'idle'
days-before-stale: 14
days-before-close: -1
operations-per-run: 100
exempt-issue-labels: 'backlog'
- uses: actions/stale@v3
name: Setting PR as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR is idle because it has been open for 14 days with no activity.'
stale-pr-label: 'idle'
days-before-stale: 14
days-before-close: -1
operations-per-run: 100
label-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
name: Setting issue as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is idle because it has been open for 14 days with no activity.'
stale-issue-label: 'idle'
days-before-stale: 14
days-before-close: -1
operations-per-run: 100
exempt-issue-labels: 'backlog'

- uses: actions/stale@v3
name: Setting PR as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR is idle because it has been open for 14 days with no activity.'
stale-pr-label: 'idle'
days-before-stale: 14
days-before-close: -1
operations-per-run: 100
112 changes: 56 additions & 56 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
name: Integration test for k8s-bake-v1
on:
pull_request:
pull_request:

jobs:
run-integration-test:
name: Validate release and main branch
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
name: Checkout branch
run-integration-test:
name: Validate release and main branch
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
name: Checkout branch

- name: Install npm packages
run: |
npm install --no-bin-links
- name: Install npm packages
run: |
npm install --no-bin-links

- name: Install ncc
run: npm i -g @vercel/ncc

- name: Build
run: ncc build src/run.ts -o lib
- name: Install ncc
run: npm i -g @vercel/ncc

- name: Bake using Helm on ${{ matrix.os }}
uses: ./
with:
renderEngine: "helm"
helmChart: "./testResources/Helm/HelmCharts"
helm-version: "latest"
silent: "false"
namespace: "namespaceExample"
overrideFiles: "./testResources/Helm/values.yaml"
overrides: |
serviceName:aks-helloworld-test
id: helm-bake
- name: Build
run: ncc build src/run.ts -o lib

- name: Validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.helm-bake.outputs.manifestsBundle }}
- name: Bake using Helm on ${{ matrix.os }}
uses: ./
with:
renderEngine: 'helm'
helmChart: './testResources/Helm/HelmCharts'
helm-version: 'latest'
silent: 'false'
namespace: 'namespaceExample'
overrideFiles: './testResources/Helm/values.yaml'
overrides: |
serviceName:aks-helloworld-test
id: helm-bake

- name: Executing latest changes on ${{ matrix.os }}
uses: ./
with:
renderEngine: "kompose"
dockerComposeFile: "./testResources/Kompose/docker-compose.yml"
kompose-version: "latest"
id: kompose-bake
- name: Validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.helm-bake.outputs.manifestsBundle }}

- name: validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.kompose-bake.outputs.manifestsBundle }}
- name: Executing latest changes on ${{ matrix.os }}
uses: ./
with:
renderEngine: 'kompose'
dockerComposeFile: './testResources/Kompose/docker-compose.yml'
kompose-version: 'latest'
id: kompose-bake

- name: Bake using Kustomize on ${{ matrix.os }}
uses: ./
with:
renderEngine: "kustomize"
kustomizationPath: "./testResources/Kustomize"
kubectl-version: "latest"
id: kustomize-bake
- name: validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.kompose-bake.outputs.manifestsBundle }}

- name: Validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.kustomize-bake.outputs.manifestsBundle }}
- name: Bake using Kustomize on ${{ matrix.os }}
uses: ./
with:
renderEngine: 'kustomize'
kustomizationPath: './testResources/Kustomize'
kubectl-version: 'latest'
id: kustomize-bake

- name: Validate created manifest ${{ matrix.os }}
uses: Azure/k8s-lint@v1
with:
manifests: ${{ steps.kustomize-bake.outputs.manifestsBundle }}
18 changes: 18 additions & 0 deletions .github/workflows/prettify-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Run prettify'
on:
pull_request:
push:
branches: [main]

jobs:
prettier:
name: Prettier Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Enforce Prettier
uses: actionsx/prettier@v2
with:
args: --check .
18 changes: 9 additions & 9 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Create release PR

on:
workflow_dispatch:
inputs:
release:
description: "Define release version (ex: v1, v2, v3)"
required: true
workflow_dispatch:
inputs:
release:
description: 'Define release version (ex: v1, v2, v3)'
required: true

jobs:
release-pr:
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
with:
release: ${{ github.event.inputs.release }}
release-pr:
uses: OliverMKing/javascript-release-workflow/.github/workflows/release-pr.yml@main
with:
release: ${{ github.event.inputs.release }}
10 changes: 5 additions & 5 deletions .github/workflows/tag-and-draft.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Tag and create release draft

on:
push:
branches:
- releases/*
push:
branches:
- releases/*

jobs:
tag-and-release:
uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main
tag-and-release:
uses: OliverMKing/javascript-release-workflow/.github/workflows/tag-and-release.yml@main
38 changes: 19 additions & 19 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Run unit tests."
name: 'Run unit tests.'
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- main
- "releases/*"
push:
branches:
- main
- "releases/*"
pull_request:
branches:
- main
- 'releases/*'
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci works properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Running L0 tests.
run: |
sudo npm install n
sudo n latest
npm install
npm test
build: # make sure build/ci works properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Running L0 tests.
run: |
sudo npm install n
sudo n latest
npm install
npm test
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# dependencies
/node_modules
coverage
/lib
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "none",
"bracketSpacing": false,
"semi": false,
"tabWidth": 3,
"singleQuote": true,
"printWidth": 80
}
18 changes: 9 additions & 9 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Microsoft Open Source Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
Resources:
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

Expand Down
Loading