Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/github.com/aws/aws-s…
Browse files Browse the repository at this point in the history
…dk-go-v2/service/ssm-1.36.3
  • Loading branch information
adityathebe committed Aug 2, 2023
2 parents 3ab8eab + f82840c commit 64fabec
Show file tree
Hide file tree
Showing 273 changed files with 24,066 additions and 10,183 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[*.{js,jsx,ts,tsx,json,yaml}]
charset = utf-8
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
on: pull_request
name: Build
# Declare default permissions as read only
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Build Container
run: make docker
env:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,50 @@ on:
- main
pull_request:
merge_group:
permissions: read-all
jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: 1.19.x
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2 # TODO: Catching new linter errors now. Need to fix those and upgrade to v1.53.0
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0

- name: setup node
uses: actions/setup-node@v2
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: "12"
- name: Check auto-generated files
env:
CI: false
run: |
mkdir -p ui/build
touch ui/build/noop
make resources
git diff
changed_files=$(git status -s)
[[ -z "$changed_files" ]] || (printf "Change is detected in some files: \n$changed_files\n Did you run 'make resources' before sending the PR?" && exit 1)
helm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
with:
version: v3.4.0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
uses: helm/chart-testing-action@5f16c27cf7a4fa9c776ff73734df3909b2b65127 # v2.1.0
- name: Lint chart
run: ct lint --charts ./chart
8 changes: 5 additions & 3 deletions .github/workflows/postgres-and-push-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ on:
- "**.yml"
- "test/**"
name: Postgres-and-Push-Test
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
with:
path: |
~/go/pkg/mod
Expand Down
48 changes: 28 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@ jobs:
release-version: ${{ steps.semantic.outputs.new_release_version }}
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
steps:
- uses: actions/checkout@v2
- uses: cycjimmy/semantic-release-action@v3
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: cycjimmy/semantic-release-action@8e58d20d0f6c8773181f43eb74d6a05e3099571d # v3.4.2
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
binary:
runs-on: ubuntu-latest
needs: semantic-release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: v1.19.x
- uses: actions/cache@v2
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
with:
path: |
~/go/pkg/mod
Expand All @@ -42,7 +39,7 @@ jobs:
env:
VERSION: v${{ needs.semantic-release.outputs.release-version }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
uses: svenstaro/upload-release-action@58d525808845e4c8ff229ea1d5d7c496504a79bc # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./.release/*
Expand All @@ -53,27 +50,38 @@ jobs:
needs: semantic-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set version
# Always use git tags as semantic release can fail due to rate limit
run: |
git fetch --prune --unshallow
echo "RELEASE_VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')" >> $GITHUB_ENV
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
- name: Publish minimal image to registry
uses: elgohr/Publish-Docker-Github-Action@8217e91c0369a5342a4ef2d612de87492410a666 # master
with:
name: flanksource/canary-checker
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true
dockerfile: build/minimal/Dockerfile
tags: "latest,v${{ env.RELEASE_VERSION }}"
- name: Publish full image to registry
uses: elgohr/Publish-Docker-Github-Action@8217e91c0369a5342a4ef2d612de87492410a666 # master
with:
name: flanksource/canary-checker-full
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
snapshot: true
dockerfile: build/full/Dockerfile
tags: "latest,v${{ env.RELEASE_VERSION }}"

# docs:
# runs-on: ubuntu-latest
# needs: semantic-release
# container:
# image: flanksource/build-tools:v0.15.1
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
# - name: setup node
# uses: actions/setup-node@v2
# with:
Expand All @@ -86,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
needs: [semantic-release, docker]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Download yq
run: |
wget -nv -nc -O yq https://github.com/mikefarah/yq/releases/download/v4.20.2/yq_linux_amd64
Expand All @@ -103,14 +111,14 @@ jobs:
- name: Update image tags
run: ./yq -i e '.image.tag = "v${{ env.RELEASE_VERSION }}"' chart/values.yaml
- name: Set up Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # v1.1
with:
version: v3.8.0
- name: Package Helm chart
run: |
make chart
- name: Clone charts repo
uses: actions/checkout@v3
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: "${{ github.repository_owner }}/charts"
path: charts
Expand All @@ -121,7 +129,7 @@ jobs:
cp ../canary-checker-*.tgz ./
helm repo index --merge index.yaml .
- name: Push changes to chart repo
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
with:
commit_message: "Release ${{ needs.semantic-release.outputs.release-version }} of ${{ github.repository }}"
branch: gh-pages
Expand All @@ -131,13 +139,13 @@ jobs:
runs-on: ubuntu-latest
needs: [helm, semantic-release]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Set version
# Always use git tags as semantic release can fail due to rate limit
run: |
git fetch --prune --unshallow
echo "RELEASE_VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: "${{ github.repository_owner }}/incident-commander-chart"
token: ${{ secrets.FLANKBOT }}
Expand All @@ -154,7 +162,7 @@ jobs:
cd ./incident-commander-chart
yq eval-all -i '(.dependencies[] | select(.name == "canary-checker")) ref $d | $d.version = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml
- name: Push changes to chart repo
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
with:
commit_message: "chore: update canary-checker chart dependency to ${{ env.RELEASE_VERSION }}"
repository: ./incident-commander-chart
72 changes: 72 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '25 3 * * 3'
push:
branches: [ "master" ]

# Declare default permissions as read only
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
with:
sarif_file: results.sarif
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
merge_group:
name: Test
permissions:
contents: read
jobs:
test:
strategy:
Expand All @@ -16,16 +18,18 @@ jobs:
- minimal --skip-all
- k8s
- datasources
- search
- git
# - restic
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
with:
go-version: 1.19.x
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
with:
path: |
~/go/pkg/mod
Expand All @@ -35,17 +39,13 @@ jobs:
restore-keys: |
cache-
- run: make bin
- name: Install restic
run: |
sudo apt-get install restic
sudo restic self-update
- name: Test
env:
KUBERNETES_VERSION: v1.20.7
GH_TOKEN: ${{ secrets.CHECKRUNS_TOKEN }}
run: ./test/e2e.sh fixtures/${{matrix.suite}}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@b9f6c61d965bcaa18acc02d6daf706373a448f02 # v1.40
if: always() && github.event.repository.fork == 'false'
with:
files: test/test-results.xml
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ bin/
.env
.certs
.kube
build/
docs/cli/
.DS_Store
cover.out
test.test
test.out
*.tgz
*.log
wait4x
Expand All @@ -18,4 +18,4 @@ chart/templates/crd.yaml
postgres-db/
ui/scripts/
Chart.lock
chart/charts/
chart/charts/
Loading

0 comments on commit 64fabec

Please sign in to comment.