From 87bcfcd93ee361ffd0e54788231ecc1240fcfa30 Mon Sep 17 00:00:00 2001 From: Cole Killian Date: Tue, 15 Jun 2021 14:23:45 -0700 Subject: [PATCH 1/3] feat: replace wisp-prod with secrets.GKE_CLUSTER --- .github/workflows/dev.yaml | 125 ++++++++++++++++++------------------ .github/workflows/prod.yaml | 109 ++++++++++++++++--------------- 2 files changed, 116 insertions(+), 118 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 7e2c5aa..8b19cba 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -1,79 +1,78 @@ name: Build, Tag, Publish and Deploy to GKE on: - push: - branches: - - dev + push: + branches: + - dev # Environment variables available to all jobs and steps in this workflow env: - GITHUB_SHA: ${{ github.sha }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} - PROJECT_ID: ${{ secrets.GKE_PROJECT }} - GKE_CLUSTER: wisp-prod - GKE_ZONE: northamerica-northeast1-c - IMAGE: wisp-users + GITHUB_SHA: ${{ github.sha }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} + PROJECT_ID: ${{ secrets.GKE_PROJECT }} + GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} + GKE_ZONE: northamerica-northeast1-c + IMAGE: wisp-users jobs: - setup-build-tag-publish-deploy: - name: Setup, Build, Tag, Publish, and Deploy - runs-on: ubuntu-latest - steps: + setup-build-tag-publish-deploy: + name: Setup, Build, Tag, Publish, and Deploy + runs-on: ubuntu-latest + steps: + # Checkout Commit + - name: Checkout + uses: actions/checkout@v2 - # Checkout Commit - - name: Checkout - uses: actions/checkout@v2 + # Setup gcloud CLI + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GKE_SA_KEY }} + project_id: ${{ secrets.GKE_PROJECT }} - # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - service_account_key: ${{ secrets.GKE_SA_KEY }} - project_id: ${{ secrets.GKE_PROJECT }} + # Configure Docker to use the gcloud command-line tool as a credential + # helper for authentication + - run: |- + gcloud --quiet auth configure-docker + - run: |- + gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" - # Configure Docker to use the gcloud command-line tool as a credential - # helper for authentication - - run: |- - gcloud --quiet auth configure-docker - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + # Build the Docker image + - name: Build + run: | + docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) . - # Build the Docker image - - name: Build - run: | - docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) . - - # Tag the Docker image - - name: Tag - run: | - docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":dev-latest + # Tag the Docker image + - name: Tag + run: | + docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":dev-latest - # Push the Docker image to Dockerhub - - name: Publish - run: | - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - docker push $DOCKER_ORGANIZATION/$IMAGE - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + # Push the Docker image to Dockerhub + - name: Publish + run: | + docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + docker push $DOCKER_ORGANIZATION/$IMAGE + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # Install helm for use in pipeline - - name: Install helm - run: | - wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh + # Install helm for use in pipeline + - name: Install helm + run: | + wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh - # Deploy to GKE cluster using helm - - name: Deploy - run: |- - helm upgrade --atomic --install dev-users ./chart/wisp-users/ --namespace dev --set image.tag=dev-$(echo ${GITHUB_SHA} | cut -c1-8) + # Deploy to GKE cluster using helm + - name: Deploy + run: |- + helm upgrade --atomic --install dev-users ./chart/wisp-users/ --namespace dev --set image.tag=dev-$(echo ${GITHUB_SHA} | cut -c1-8) - e2e: - needs: setup-build-tag-publish-deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: wget https://raw.githubusercontent.com/Compete-McGill/wisp/master/e2e/docker-compose.yaml -O docker-compose.e2e.yaml - - run: docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - - run: docker-compose -f docker-compose.e2e.yaml up --abort-on-container-exit \ No newline at end of file + e2e: + needs: setup-build-tag-publish-deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: wget https://raw.githubusercontent.com/Compete-McGill/wisp/master/e2e/docker-compose.yaml -O docker-compose.e2e.yaml + - run: docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + - run: docker-compose -f docker-compose.e2e.yaml up --abort-on-container-exit diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index 49b5304..bc8ccac 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -1,70 +1,69 @@ name: Build, Tag, and Publish to DockerHub on: - push: - branches: - - master + push: + branches: + - master # Environment variables available to all jobs and steps in this workflow env: - GITHUB_SHA: ${{ github.sha }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} - PROJECT_ID: ${{ secrets.GKE_PROJECT }} - GKE_CLUSTER: wisp-prod - GKE_ZONE: northamerica-northeast1-c - IMAGE: wisp-users + GITHUB_SHA: ${{ github.sha }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} + PROJECT_ID: ${{ secrets.GKE_PROJECT }} + GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} + GKE_ZONE: northamerica-northeast1-c + IMAGE: wisp-users jobs: - setup-build-tag-publish-deploy: - name: Setup, Build, Tag, and Publish - runs-on: ubuntu-latest - steps: + setup-build-tag-publish-deploy: + name: Setup, Build, Tag, and Publish + runs-on: ubuntu-latest + steps: + # Checkout Commit + - name: Checkout + uses: actions/checkout@v2 - # Checkout Commit - - name: Checkout - uses: actions/checkout@v2 + # Setup gcloud CLI + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GKE_SA_KEY }} + project_id: ${{ secrets.GKE_PROJECT }} - # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - service_account_key: ${{ secrets.GKE_SA_KEY }} - project_id: ${{ secrets.GKE_PROJECT }} + # Configure Docker to use the gcloud command-line tool as a credential + # helper for authentication + - run: |- + gcloud --quiet auth configure-docker + - run: |- + gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" - # Configure Docker to use the gcloud command-line tool as a credential - # helper for authentication - - run: |- - gcloud --quiet auth configure-docker - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + # Build the Docker image + - name: Build + run: | + docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) . - # Build the Docker image - - name: Build - run: | - docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) . - - # Tag the Docker image - - name: Tag - run: | - docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":latest + # Tag the Docker image + - name: Tag + run: | + docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":latest - # Push the Docker image to Dockerhub - - name: Publish - run: | - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - docker push $DOCKER_ORGANIZATION/$IMAGE - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + # Push the Docker image to Dockerhub + - name: Publish + run: | + docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + docker push $DOCKER_ORGANIZATION/$IMAGE + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # Install helm for use in pipeline - - name: Install helm - run: | - wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh + # Install helm for use in pipeline + - name: Install helm + run: | + wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh - # Deploy to GKE cluster using helm - - name: Deploy - run: |- - helm upgrade --atomic --install prod-users ./chart/wisp-users/ --namespace prod --set image.tag=$(echo ${GITHUB_SHA} | cut -c1-8) --set replicaCount=2 \ No newline at end of file + # Deploy to GKE cluster using helm + - name: Deploy + run: |- + helm upgrade --atomic --install prod-users ./chart/wisp-users/ --namespace prod --set image.tag=$(echo ${GITHUB_SHA} | cut -c1-8) --set replicaCount=2 From 7a75347f208e7e07ef92e82e1d420af887a7f654 Mon Sep 17 00:00:00 2001 From: Cole Killian Date: Tue, 15 Jun 2021 18:01:40 -0700 Subject: [PATCH 2/3] feat: convert GKE_ZONE to github secret --- .github/workflows/dev.yaml | 124 ++++++++++++++++++------------------ .github/workflows/prod.yaml | 108 +++++++++++++++---------------- 2 files changed, 116 insertions(+), 116 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 8b19cba..114bfc9 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -1,78 +1,78 @@ name: Build, Tag, Publish and Deploy to GKE on: - push: - branches: - - dev + push: + branches: + - dev # Environment variables available to all jobs and steps in this workflow env: - GITHUB_SHA: ${{ github.sha }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} - PROJECT_ID: ${{ secrets.GKE_PROJECT }} - GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} - GKE_ZONE: northamerica-northeast1-c - IMAGE: wisp-users + GITHUB_SHA: ${{ github.sha }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} + PROJECT_ID: ${{ secrets.GKE_PROJECT }} + GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} + GKE_ZONE: ${{ secrets.GKE_ZONE }} + IMAGE: wisp-users jobs: - setup-build-tag-publish-deploy: - name: Setup, Build, Tag, Publish, and Deploy - runs-on: ubuntu-latest - steps: - # Checkout Commit - - name: Checkout - uses: actions/checkout@v2 + setup-build-tag-publish-deploy: + name: Setup, Build, Tag, Publish, and Deploy + runs-on: ubuntu-latest + steps: + # Checkout Commit + - name: Checkout + uses: actions/checkout@v2 - # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - service_account_key: ${{ secrets.GKE_SA_KEY }} - project_id: ${{ secrets.GKE_PROJECT }} + # Setup gcloud CLI + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GKE_SA_KEY }} + project_id: ${{ secrets.GKE_PROJECT }} - # Configure Docker to use the gcloud command-line tool as a credential - # helper for authentication - - run: |- - gcloud --quiet auth configure-docker - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + # Configure Docker to use the gcloud command-line tool as a credential + # helper for authentication + - run: |- + gcloud --quiet auth configure-docker + - run: |- + gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" - # Build the Docker image - - name: Build - run: | - docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) . + # Build the Docker image + - name: Build + run: | + docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) . - # Tag the Docker image - - name: Tag - run: | - docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":dev-latest + # Tag the Docker image + - name: Tag + run: | + docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":dev-$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":dev-latest - # Push the Docker image to Dockerhub - - name: Publish - run: | - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - docker push $DOCKER_ORGANIZATION/$IMAGE - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + # Push the Docker image to Dockerhub + - name: Publish + run: | + docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + docker push $DOCKER_ORGANIZATION/$IMAGE + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # Install helm for use in pipeline - - name: Install helm - run: | - wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh + # Install helm for use in pipeline + - name: Install helm + run: | + wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh - # Deploy to GKE cluster using helm - - name: Deploy - run: |- - helm upgrade --atomic --install dev-users ./chart/wisp-users/ --namespace dev --set image.tag=dev-$(echo ${GITHUB_SHA} | cut -c1-8) + # Deploy to GKE cluster using helm + - name: Deploy + run: |- + helm upgrade --atomic --install dev-users ./chart/wisp-users/ --namespace dev --set image.tag=dev-$(echo ${GITHUB_SHA} | cut -c1-8) - e2e: - needs: setup-build-tag-publish-deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: wget https://raw.githubusercontent.com/Compete-McGill/wisp/master/e2e/docker-compose.yaml -O docker-compose.e2e.yaml - - run: docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - - run: docker-compose -f docker-compose.e2e.yaml up --abort-on-container-exit + e2e: + needs: setup-build-tag-publish-deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: wget https://raw.githubusercontent.com/Compete-McGill/wisp/master/e2e/docker-compose.yaml -O docker-compose.e2e.yaml + - run: docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + - run: docker-compose -f docker-compose.e2e.yaml up --abort-on-container-exit diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index bc8ccac..0612c0b 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -1,69 +1,69 @@ name: Build, Tag, and Publish to DockerHub on: - push: - branches: - - master + push: + branches: + - master # Environment variables available to all jobs and steps in this workflow env: - GITHUB_SHA: ${{ github.sha }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} - PROJECT_ID: ${{ secrets.GKE_PROJECT }} - GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} - GKE_ZONE: northamerica-northeast1-c - IMAGE: wisp-users + GITHUB_SHA: ${{ github.sha }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_ORGANIZATION: ${{ secrets.DOCKER_ORGANIZATION }} + PROJECT_ID: ${{ secrets.GKE_PROJECT }} + GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }} + GKE_ZONE: ${{ secrets.GKE_ZONE }} + IMAGE: wisp-users jobs: - setup-build-tag-publish-deploy: - name: Setup, Build, Tag, and Publish - runs-on: ubuntu-latest - steps: - # Checkout Commit - - name: Checkout - uses: actions/checkout@v2 + setup-build-tag-publish-deploy: + name: Setup, Build, Tag, and Publish + runs-on: ubuntu-latest + steps: + # Checkout Commit + - name: Checkout + uses: actions/checkout@v2 - # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - service_account_key: ${{ secrets.GKE_SA_KEY }} - project_id: ${{ secrets.GKE_PROJECT }} + # Setup gcloud CLI + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + service_account_key: ${{ secrets.GKE_SA_KEY }} + project_id: ${{ secrets.GKE_PROJECT }} - # Configure Docker to use the gcloud command-line tool as a credential - # helper for authentication - - run: |- - gcloud --quiet auth configure-docker - - run: |- - gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" + # Configure Docker to use the gcloud command-line tool as a credential + # helper for authentication + - run: |- + gcloud --quiet auth configure-docker + - run: |- + gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" - # Build the Docker image - - name: Build - run: | - docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) . + # Build the Docker image + - name: Build + run: | + docker build -t "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) . - # Tag the Docker image - - name: Tag - run: | - docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":latest + # Tag the Docker image + - name: Tag + run: | + docker tag "$DOCKER_ORGANIZATION"/"$IMAGE":$(echo ${GITHUB_SHA} | cut -c1-8) "$DOCKER_ORGANIZATION"/"$IMAGE":latest - # Push the Docker image to Dockerhub - - name: Publish - run: | - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD - docker push $DOCKER_ORGANIZATION/$IMAGE - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + # Push the Docker image to Dockerhub + - name: Publish + run: | + docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + docker push $DOCKER_ORGANIZATION/$IMAGE + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - # Install helm for use in pipeline - - name: Install helm - run: | - wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh + # Install helm for use in pipeline + - name: Install helm + run: | + wget -q -O get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh - # Deploy to GKE cluster using helm - - name: Deploy - run: |- - helm upgrade --atomic --install prod-users ./chart/wisp-users/ --namespace prod --set image.tag=$(echo ${GITHUB_SHA} | cut -c1-8) --set replicaCount=2 + # Deploy to GKE cluster using helm + - name: Deploy + run: |- + helm upgrade --atomic --install prod-users ./chart/wisp-users/ --namespace prod --set image.tag=$(echo ${GITHUB_SHA} | cut -c1-8) --set replicaCount=2 From 97005fbc20d0e577d67a59e1d9e02db193f78b41 Mon Sep 17 00:00:00 2001 From: Cole Killian Date: Tue, 15 Jun 2021 18:01:49 -0700 Subject: [PATCH 3/3] feat: update prettierrc with tabWidth 2 for yaml --- .prettierrc.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index 9831d86..94825f9 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,6 +1,14 @@ module.exports = { - semi: true, - trailingComma: "none", - singleQuote: false, - tabWidth: 4 -}; \ No newline at end of file + semi: true, + trailingComma: "none", + singleQuote: false, + tabWidth: 4, + overrides: [ + { + files: ["*.yaml"], + options: { + tabWidth: 2 + } + } + ] +};