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

Add singapore to deploy matrix #23

Merged
merged 3 commits into from
Sep 14, 2023
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
58 changes: 29 additions & 29 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,30 @@ jobs:

- name: Helm Upgrade
run: |
region_values=''
region_values=''
if [[ -e "./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ inputs.region }}.yaml" ]]; then
region_values=--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ inputs.region }}.yaml
region_values=--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ inputs.region }}.yaml"
fi
standard_values=''
if [[ "${{inputs.helm_inject_standard_deploy_values}}" == "true" ]]; then
standard_values="--set-string imageName=${{ inputs.registry }} --set-string imageTag=${{ inputs.tag }} --set-string deployment.region=${{ inputs.region }}"
fi
helm upgrade ${{ inputs.chart_name }} ${{ inputs.chart_path }} --install --wait --atomic --cleanup-on-fail \
--kubeconfig=./kubeconfig_${{ inputs.env }}_${{ inputs.region }} \
--namespace=${{ inputs.chart_namespace }} \
--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml \
--timeout ${{ inputs.helm_timeout }} \
${region_values} \
${standard_values} \
${{ inputs.helm_ext_args }}
helm upgrade "${{ inputs.chart_name }}" "${{ inputs.chart_path }}" --install --wait --atomic --cleanup-on-fail \
--kubeconfig="./kubeconfig_${{ inputs.env }}_${{ inputs.region }}" \
--namespace="${{ inputs.chart_namespace }}" \
--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml" \
--timeout "${{ inputs.helm_timeout }}" \
"${region_values}" \
"${standard_values}" \
"${{ inputs.helm_ext_args }}"

# Prod - Deploy against all the regions specified in strategy.matrix.region
deploy_all_regions_prod:
if: inputs.region == 'all' && inputs.env == 'prod'
strategy:
max-parallel: 1
matrix:
region: [us-east-1, us-west-2, eu-west-1, eu-central-1, ap-southeast-2, us-east-2]
region: [us-east-1, us-west-2, eu-west-1, eu-central-1, ap-southeast-2, us-east-2, ap-southeast-1]
runs-on: ${{ inputs.env }}-${{ matrix.region }}
name: Deploy-all ${{ inputs.env }}-${{ matrix.region }}@${{ inputs.tag }}
steps:
Expand Down Expand Up @@ -188,20 +188,20 @@ jobs:
echo "####### Helm upgrade for ${{ inputs.env }}_${{ matrix.region }} ####### "
region_values=''
if [[ -e "./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml" ]]; then
region_values=--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml
region_values=--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml"
fi
standard_values=''
if [[ "${{inputs.helm_inject_standard_deploy_values}}" == "true" ]]; then
standard_values="--set-string imageName=${{ inputs.registry }} --set-string imageTag=${{ inputs.tag }} --set-string deployment.region=${{ matrix.region }}"
fi
helm upgrade ${{ inputs.chart_name }} ${{ inputs.chart_path }} --install --wait --atomic --cleanup-on-fail \
--kubeconfig=./kubeconfig_${{ inputs.env }}_${{ matrix.region }} \
--namespace=${{ inputs.chart_namespace }} \
--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml \
--timeout ${{ inputs.helm_timeout }} \
${region_values} \
${standard_values} \
${{ inputs.helm_ext_args }}
helm upgrade "${{ inputs.chart_name }}" "${{ inputs.chart_path }}" --install --wait --atomic --cleanup-on-fail \
--kubeconfig="./kubeconfig_${{ inputs.env }}_${{ matrix.region }}" \
--namespace="${{ inputs.chart_namespace }}" \
--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml" \
--timeout "${{ inputs.helm_timeout }}" \
"${region_values}" \
"${standard_values}" \
"${{ inputs.helm_ext_args }}"

# Dev - Deploy against all the regions specified in strategy.matrix.region
deploy_all_regions_dev:
Expand Down Expand Up @@ -237,17 +237,17 @@ jobs:
echo "####### Helm upgrade for ${{ inputs.env }}_${{ matrix.region }} ####### "
region_values=''
if [[ -e "./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml" ]]; then
region_values=--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml
region_values=--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}-${{ matrix.region }}.yaml"
fi
standard_values=''
if [[ "${{inputs.helm_inject_standard_deploy_values}}" == "true" ]]; then
standard_values="--set-string imageName=${{ inputs.registry }} --set-string imageTag=${{ inputs.tag }} --set-string deployment.region=${{ matrix.region }}"
fi
helm upgrade ${{ inputs.chart_name }} ${{ inputs.chart_path }} --install --wait --atomic --cleanup-on-fail \
--kubeconfig=./kubeconfig_${{ inputs.env }}_${{ matrix.region }} \
--namespace=${{ inputs.chart_namespace }} \
--values=./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml \
--timeout ${{ inputs.helm_timeout }} \
${region_values} \
${standard_values} \
${{ inputs.helm_ext_args }}
helm upgrade "${{ inputs.chart_name }}" "${{ inputs.chart_path }}" --install --wait --atomic --cleanup-on-fail \
--kubeconfig="./kubeconfig_${{ inputs.env }}_${{ matrix.region }}" \
--namespace="${{ inputs.chart_namespace }}" \
--values="./${{ inputs.chart_path }}/values/${{ inputs.env }}.yaml" \
--timeout "${{ inputs.helm_timeout }}" \
"${region_values}" \
"${standard_values}" \
"${{ inputs.helm_ext_args }}"
16 changes: 6 additions & 10 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ jobs:
id: files
uses: jitterbit/get-changed-files@v1
continue-on-error: true

- name: Download action linter
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)

- name: Run action linter
run: |
./actionlint -oneline -ignore 'label ".+" is unknown' \
-ignore '".+" is potentially untrusted' \
-ignore '".+" SC2086 ".+"' \
${{ steps.files.outputs.all }} \

- uses: reviewdog/action-actionlint@v1
with:
actionlint_flags: -config-file .github/actionlint.yaml
fail_on_error: true
level: error

3 changes: 3 additions & 0 deletions actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- non-prod