From c8768387f6205634f85cc762ac34745c1407ec0c Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 25 Jul 2021 14:51:28 -0700 Subject: [PATCH 01/23] adding docker build -> ghcr.io --- .github/workflows/docker-build.yaml | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/docker-build.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000..337b6c8 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,53 @@ +name: Docker +on: + schedule: + - cron: '36 12 * * *' + push: + branches: [ master, influxdb ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From c97388ff60b3dd756348170599880ec1084559ed Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 25 Jul 2021 15:39:30 -0700 Subject: [PATCH 02/23] tagging. --- .github/workflows/docker-build.yaml | 86 +++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 337b6c8..a7c1685 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -13,8 +13,7 @@ env: jobs: - build: - + collector: runs-on: ubuntu-latest permissions: contents: read @@ -23,7 +22,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} @@ -33,13 +31,14 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: + tags: | + type=ref,enable=true,event=branch,prefix=collector- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) @@ -48,6 +47,85 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . + file: docker/Dockerfile.collector + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + web: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + tags: | + type=ref,enable=true,event=branch,prefix=web- + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + file: docker/Dockerfile.web + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + omnibus: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + tags: | + type=ref,enable=true,event=branch,prefix=omnibus- + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + file: docker/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From b197d349f46fe863aca267dbb8a480921e13a6d4 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 25 Jul 2021 15:52:07 -0700 Subject: [PATCH 03/23] setting the image type as suffix. --- .github/workflows/docker-build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index a7c1685..aa03a25 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -38,7 +38,7 @@ jobs: uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: tags: | - type=ref,enable=true,event=branch,prefix=collector- + type=ref,enable=true,event=branch,suffix=-collector images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) @@ -77,7 +77,7 @@ jobs: uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: tags: | - type=ref,enable=true,event=branch,prefix=web- + type=ref,enable=true,event=branch,suffix=-web images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) @@ -116,7 +116,7 @@ jobs: uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: tags: | - type=ref,enable=true,event=branch,prefix=omnibus- + type=ref,enable=true,event=branch,suffix=-omnibus images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) From fa5d0e44c4891527872e539c64bc8d5fd2782052 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Mon, 2 Aug 2021 21:52:45 -0700 Subject: [PATCH 04/23] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b218b2c..9650190 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/AnalogJ/scrutiny?style=flat-square)](https://goreportcard.com/report/github.com/AnalogJ/scrutiny) [![GitHub release](http://img.shields.io/github/release/AnalogJ/scrutiny.svg?style=flat-square)](https://github.com/AnalogJ/scrutiny/releases) - WebUI for smartd S.M.A.R.T monitoring > NOTE: Scrutiny is a Work-in-Progress and still has some rough edges. @@ -23,6 +22,8 @@ WebUI for smartd S.M.A.R.T monitoring # Introduction +> WARNING: Once the [InfluxDB](https://github.com/AnalogJ/scrutiny/tree/influxdb) branch is merged, Scrutiny will use both sqlite and InfluxDB for data storage. Unfortunately, this may not be backwards compatible with the database structures in the master (sqlite only) branch. + If you run a server with more than a couple of hard drives, you're probably already familiar with S.M.A.R.T and the `smartd` daemon. If not, it's an incredible open source project described as the following: > smartd is a daemon that monitors the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into many ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to monitor the reliability of the hard drive and predict drive failures, and to carry out different types of drive self-tests. From 6d4196085ea6943865afda378f259ede00fca2de Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Mon, 2 Aug 2021 21:53:44 -0700 Subject: [PATCH 05/23] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9650190..ec090c5 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ WebUI for smartd S.M.A.R.T monitoring > NOTE: Scrutiny is a Work-in-Progress and still has some rough edges. +> +> WARNING: Once the [InfluxDB](https://github.com/AnalogJ/scrutiny/tree/influxdb) branch is merged, Scrutiny will use both sqlite and InfluxDB for data storage. Unfortunately, this may not be backwards compatible with the database structures in the master (sqlite only) branch. [![](docs/dashboard.png)](https://imgur.com/a/5k8qMzS) # Introduction -> WARNING: Once the [InfluxDB](https://github.com/AnalogJ/scrutiny/tree/influxdb) branch is merged, Scrutiny will use both sqlite and InfluxDB for data storage. Unfortunately, this may not be backwards compatible with the database structures in the master (sqlite only) branch. - If you run a server with more than a couple of hard drives, you're probably already familiar with S.M.A.R.T and the `smartd` daemon. If not, it's an incredible open source project described as the following: > smartd is a daemon that monitors the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into many ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to monitor the reliability of the hard drive and predict drive failures, and to carry out different types of drive self-tests. From abfaa5259ebd7421b80d8fc1c0f06f79e01b9acf Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 10:47:56 -0700 Subject: [PATCH 06/23] adding windows collector. --- .github/workflows/release-windows.yaml | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/release-windows.yaml diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml new file mode 100644 index 0000000..5a93c3f --- /dev/null +++ b/.github/workflows/release-windows.yaml @@ -0,0 +1,57 @@ +# compiles Windows artifacts and attaches them to build +name: Release Windows + +on: + release: + # Only use the types keyword to narrow down the activity types that will trigger your workflow. + types: [published] + + # for testing, we can also trigger manually. remove this afterwards. + workflow_dispatch: + inputs: + version_bump_type: + description: 'noop' + required: false + default: 'patch' + +jobs: + + release-windows: + name: Release Windows + runs-on: windows-latest + env: + PROJECT_PATH: /go/src/github.com/analogj/scrutiny + GOPATH: /go + GOOS: windows + GOARCH: amd64 + steps: + - name: Checkout + uses: actions/checkout@v2 +# TODO: uncomment this +# with: +# ref: ${{github.event.release.tag_name}} + - uses: actions/setup-go@v2 + with: + go-version: '^1.13.1' # The Go version to download (if necessary) and use. + - name: Build Binaries + run: | + + mkdir -p $(dirname "$PROJECT_PATH") + cp -R $GITHUB_WORKSPACE $PROJECT_PATH + cd $PROJECT_PATH + + mkdir -p $GITHUB_WORKSPACE/dist + + echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" + go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go + + - name: Release Asset - Collector - windows-amd64 + id: upload-release-asset2 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: './dist/scrutiny-collector-metrics-windows-amd64' + asset_name: scrutiny-collector-metrics-windows-amd64 + asset_content_type: application/octet-stream From a4d151e3f7174b1f08dde1ef599fcfe1084f179d Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 10:54:25 -0700 Subject: [PATCH 07/23] fixes for windows collector build. --- .github/workflows/release-windows.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index 5a93c3f..3efe918 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -20,8 +20,6 @@ jobs: name: Release Windows runs-on: windows-latest env: - PROJECT_PATH: /go/src/github.com/analogj/scrutiny - GOPATH: /go GOOS: windows GOARCH: amd64 steps: @@ -35,11 +33,6 @@ jobs: go-version: '^1.13.1' # The Go version to download (if necessary) and use. - name: Build Binaries run: | - - mkdir -p $(dirname "$PROJECT_PATH") - cp -R $GITHUB_WORKSPACE $PROJECT_PATH - cd $PROJECT_PATH - mkdir -p $GITHUB_WORKSPACE/dist echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" From fb564afe3003444382374a8e81e346ae6e322758 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 10:57:02 -0700 Subject: [PATCH 08/23] fixes for windows collector build. --- .github/workflows/release-windows.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index 3efe918..cedfc88 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -32,6 +32,7 @@ jobs: with: go-version: '^1.13.1' # The Go version to download (if necessary) and use. - name: Build Binaries + shell: bash run: | mkdir -p $GITHUB_WORKSPACE/dist From 5c492986a55334bcb1b7b573268566289b45fe43 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 10:58:56 -0700 Subject: [PATCH 09/23] fixes for windows collector build. --- .github/workflows/release-windows.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index cedfc88..1e01482 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -38,7 +38,8 @@ jobs: echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go - + ls $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe + - name: Release Asset - Collector - windows-amd64 id: upload-release-asset2 uses: actions/upload-release-asset@v1 From 33e370e90fe787119d08e0a78e04856628aac444 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 11:02:14 -0700 Subject: [PATCH 10/23] fix paths. --- .github/workflows/release-windows.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index 1e01482..e920fb7 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -34,12 +34,12 @@ jobs: - name: Build Binaries shell: bash run: | - mkdir -p $GITHUB_WORKSPACE/dist + mkdir -p $GITHUB_WORKSPACE\dist echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" - go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go - ls $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe - + go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector\cmd\collector-metrics\collector-metrics.go + ls $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe + - name: Release Asset - Collector - windows-amd64 id: upload-release-asset2 uses: actions/upload-release-asset@v1 From f26dbdf8b68bfbc8ffbe3b9647daaee02382c90b Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 11:02:43 -0700 Subject: [PATCH 11/23] trigger windows binary creation on every release. --- .github/workflows/release-windows.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index e920fb7..a92ec1e 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -6,14 +6,6 @@ on: # Only use the types keyword to narrow down the activity types that will trigger your workflow. types: [published] - # for testing, we can also trigger manually. remove this afterwards. - workflow_dispatch: - inputs: - version_bump_type: - description: 'noop' - required: false - default: 'patch' - jobs: release-windows: @@ -25,9 +17,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 -# TODO: uncomment this -# with: -# ref: ${{github.event.release.tag_name}} + with: + ref: ${{github.event.release.tag_name}} - uses: actions/setup-go@v2 with: go-version: '^1.13.1' # The Go version to download (if necessary) and use. From 0d580932adb3762e13948687217e0247e6554f39 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 12:13:22 -0700 Subject: [PATCH 12/23] fix bumpr --- .github/workflows/release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f7f9e1c..9a97b40 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,8 @@ jobs: with: version_bump_type: ${{ github.event.inputs.version_bump_type }} version_metadata_path: ${{ github.event.inputs.version_metadata_path }} - github_token: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged - name: Test run: | mkdir -p $(dirname "$PROJECT_PATH") From 0460985bc508ca6c9cc82e20d197382a4aed6996 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 12:28:30 -0700 Subject: [PATCH 13/23] fix windows asset builder --- .github/workflows/release-windows.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml index a92ec1e..6a675bd 100644 --- a/.github/workflows/release-windows.yaml +++ b/.github/workflows/release-windows.yaml @@ -25,11 +25,11 @@ jobs: - name: Build Binaries shell: bash run: | - mkdir -p $GITHUB_WORKSPACE\dist + mkdir -p $GITHUB_WORKSPACE/dist echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" - go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector\cmd\collector-metrics\collector-metrics.go - ls $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe + go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go + ls $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe - name: Release Asset - Collector - windows-amd64 id: upload-release-asset2 @@ -38,6 +38,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: './dist/scrutiny-collector-metrics-windows-amd64' - asset_name: scrutiny-collector-metrics-windows-amd64 + asset_path: './dist/scrutiny-collector-metrics-windows-amd64.exe' + asset_name: scrutiny-collector-metrics-windows-amd64.exe asset_content_type: application/octet-stream From 5880e0af86891f39441de998ce5d8f547db94f28 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 12:46:45 -0700 Subject: [PATCH 14/23] using packagr actions for publishing artifacts. --- .github/workflows/release.yaml | 223 ++++++++++++++------------------- 1 file changed, 97 insertions(+), 126 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9a97b40..a6393d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,154 +51,125 @@ jobs: cd $PROJECT_PATH make all - - name: Commit - uses: EndBug/add-and-commit@v4 # You can change this to use a specific version - with: - - author_name: Jason Kulatunga - author_email: jason@thesparktree.com - cwd: ${{ env.PROJECT_PATH }} - force: false - signoff: true - message: '(${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr' - tag: ${{steps.bump_version.outputs.release_version}} + - name: Commit Changes + id: commit + uses: packagrio/action-releasr-go@master env: + # This is necessary in order to push a commit to the repo GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged - - name: Create Release - id: create_release - uses: actions/create-release@v1 + - name: Publish Release + id: publish + uses: packagrio/action-publishr-go@master env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + # This is necessary in order to push a commit to the repo + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged with: - tag_name: ${{ steps.bump_version.outputs.release_version }} - release_name: Release ${{ steps.bump_version.outputs.release_version }} - draft: false - prerelease: false - - - name: Release Asset - Web - linux-amd64 - id: upload-release-asset1 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-web-linux-amd64 - asset_name: scrutiny-web-linux-amd64 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-amd64 - id: upload-release-asset2 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-collector-metrics-linux-amd64 - asset_name: scrutiny-collector-metrics-linux-amd64 - asset_content_type: application/octet-stream + upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7' - - name: Release Asset - Web - linux-arm64 - id: upload-release-asset3 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-web-linux-arm64 - asset_name: scrutiny-web-linux-arm64 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm64 - id: upload-release-asset4 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-collector-metrics-linux-arm64 - asset_name: scrutiny-collector-metrics-linux-arm64 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-amd64 +# id: upload-release-asset1 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-web-linux-amd64 +# asset_name: scrutiny-web-linux-amd64 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-amd64 +# id: upload-release-asset2 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-collector-metrics-linux-amd64 +# asset_name: scrutiny-collector-metrics-linux-amd64 +# asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-5 - id: upload-release-asset5 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-web-linux-arm-5 - asset_name: scrutiny-web-linux-arm-5 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-5 - id: upload-release-asset6 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-collector-metrics-linux-arm-5 - asset_name: scrutiny-collector-metrics-linux-arm-5 - asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-6 - id: upload-release-asset7 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-web-linux-arm-6 - asset_name: scrutiny-web-linux-arm-6 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-6 - id: upload-release-asset8 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-collector-metrics-linux-arm-6 - asset_name: scrutiny-collector-metrics-linux-arm-6 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-arm64 +# id: upload-release-asset3 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-web-linux-arm64 +# asset_name: scrutiny-web-linux-arm64 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm64 +# id: upload-release-asset4 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-collector-metrics-linux-arm64 +# asset_name: scrutiny-collector-metrics-linux-arm64 +# asset_content_type: application/octet-stream - - name: Release Asset - Web - linux-arm-7 - id: upload-release-asset9 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-web-linux-arm-7 - asset_name: scrutiny-web-linux-arm-7 - asset_content_type: application/octet-stream - - name: Release Asset - Collector - linux-arm-7 - id: upload-release-asset10 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: /build/scrutiny-collector-metrics-linux-arm-7 - asset_name: scrutiny-collector-metrics-linux-arm-7 - asset_content_type: application/octet-stream +# - name: Release Asset - Web - linux-arm-5 +# id: upload-release-asset5 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-web-linux-arm-5 +# asset_name: scrutiny-web-linux-arm-5 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm-5 +# id: upload-release-asset6 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-collector-metrics-linux-arm-5 +# asset_name: scrutiny-collector-metrics-linux-arm-5 +# asset_content_type: application/octet-stream -# - name: Release Asset - Web - freebsd-amd64 +# - name: Release Asset - Web - linux-arm-6 # id: upload-release-asset7 # uses: actions/upload-release-asset@v1 # env: # GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # with: # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64 -# asset_name: scrutiny-web-freebsd-amd64 +# asset_path: /build/scrutiny-web-linux-arm-6 +# asset_name: scrutiny-web-linux-arm-6 # asset_content_type: application/octet-stream -# - name: Release Asset - Collector - freebsd-amd64 +# - name: Release Asset - Collector - linux-arm-6 # id: upload-release-asset8 # uses: actions/upload-release-asset@v1 # env: # GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # with: # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64 -# asset_name: scrutiny-collector-metrics-freebsd-amd64 +# asset_path: /build/scrutiny-collector-metrics-linux-arm-6 +# asset_name: scrutiny-collector-metrics-linux-arm-6 +# asset_content_type: application/octet-stream + +# - name: Release Asset - Web - linux-arm-7 +# id: upload-release-asset9 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-web-linux-arm-7 +# asset_name: scrutiny-web-linux-arm-7 +# asset_content_type: application/octet-stream +# - name: Release Asset - Collector - linux-arm-7 +# id: upload-release-asset10 +# uses: actions/upload-release-asset@v1 +# env: +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} +# with: +# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps +# asset_path: /build/scrutiny-collector-metrics-linux-arm-7 +# asset_name: scrutiny-collector-metrics-linux-arm-7 # asset_content_type: application/octet-stream From d346a394e6917a2a7db7416233c1b660e8accfb4 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 12:57:59 -0700 Subject: [PATCH 15/23] fixing packagr actions for publishing artifacts. --- .github/workflows/release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a6393d1..bc01456 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -57,7 +57,8 @@ jobs: env: # This is necessary in order to push a commit to the repo GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged - + with: + version_metadata_path: ${{ github.event.inputs.version_metadata_path }} - name: Publish Release id: publish uses: packagrio/action-publishr-go@master From 315b43ea051ebd97832663eefddab6055893cc4a Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 16:49:26 -0700 Subject: [PATCH 16/23] fixing packagr actions for publishing artifacts. --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bc01456..ecbf838 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,6 +51,9 @@ jobs: cd $PROJECT_PATH make all + # restore modified dir to GH workspace. + cp -arf $PROJECT_PATH/. $GITHUB_WORKSPACE/ + - name: Commit Changes id: commit uses: packagrio/action-releasr-go@master From fe3f38ae54163b2c5b43c1d88fc08b7631a7655a Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 23 Oct 2021 17:03:31 -0700 Subject: [PATCH 17/23] fixing packagr actions for publishing artifacts. --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ecbf838..1b830ea 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,6 +28,8 @@ jobs: git --version - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Bump version id: bump_version uses: packagrio/action-bumpr-go@master From c7603c8f62511327787976780d11b20f2aff560b Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 24 Oct 2021 22:05:28 -0700 Subject: [PATCH 18/23] karalabe/xgo-1.13.x is unmaintained, moving to techknowlogick/xgo:go-1.13.x --- .github/workflows/release.yaml | 2 +- docker/Dockerfile.xgo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b830ea..cf26754 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: karalabe/xgo-1.13.x + container: techknowlogick/xgo:go-1.13.x env: PROJECT_PATH: /go/src/github.com/analogj/scrutiny CGO_ENABLED: 1 diff --git a/docker/Dockerfile.xgo b/docker/Dockerfile.xgo index 1bb32bd..1487949 100644 --- a/docker/Dockerfile.xgo +++ b/docker/Dockerfile.xgo @@ -1,4 +1,4 @@ -FROM karalabe/xgo-1.13.x +FROM techknowlogick/xgo:go-1.13.x WORKDIR /go/src/github.com/analogj/scrutiny From a4389b176df42ac854d33cd6394c5b82b7cac666 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 24 Oct 2021 22:09:57 -0700 Subject: [PATCH 19/23] we're already building windows binaries. Lets make sure we attach them as well. --- .github/workflows/build.yaml | 2 +- .github/workflows/release-windows.yaml | 43 -------------------------- .github/workflows/release.yaml | 2 +- 3 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/release-windows.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 362aacc..0517459 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: karalabe/xgo-1.13.x + container: techknowlogick/xgo:go-1.13.x env: PROJECT_PATH: /go/src/github.com/analogj/scrutiny CGO_ENABLED: 1 diff --git a/.github/workflows/release-windows.yaml b/.github/workflows/release-windows.yaml deleted file mode 100644 index 6a675bd..0000000 --- a/.github/workflows/release-windows.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# compiles Windows artifacts and attaches them to build -name: Release Windows - -on: - release: - # Only use the types keyword to narrow down the activity types that will trigger your workflow. - types: [published] - -jobs: - - release-windows: - name: Release Windows - runs-on: windows-latest - env: - GOOS: windows - GOARCH: amd64 - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{github.event.release.tag_name}} - - uses: actions/setup-go@v2 - with: - go-version: '^1.13.1' # The Go version to download (if necessary) and use. - - name: Build Binaries - shell: bash - run: | - mkdir -p $GITHUB_WORKSPACE/dist - - echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})" - go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go - ls $GITHUB_WORKSPACE/dist/scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe - - - name: Release Asset - Collector - windows-amd64 - id: upload-release-asset2 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: './dist/scrutiny-collector-metrics-windows-amd64.exe' - asset_name: scrutiny-collector-metrics-windows-amd64.exe - asset_content_type: application/octet-stream diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cf26754..ba038ec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -71,7 +71,7 @@ jobs: # This is necessary in order to push a commit to the repo GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged with: - upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7' + upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7 /build/scrutiny-web-windows-4.0-amd64.exe /build/scrutiny-collector-metrics-windows-4.0-amd64.exe' # - name: Release Asset - Web - linux-amd64 From e572c2051f40ded8201b59ef0b149f51a9457551 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 24 Oct 2021 22:22:58 -0700 Subject: [PATCH 20/23] specify metadata path --- .github/workflows/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ba038ec..11d65ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -71,6 +71,7 @@ jobs: # This is necessary in order to push a commit to the repo GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged with: + version_metadata_path: ${{ github.event.inputs.version_metadata_path }} upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7 /build/scrutiny-web-windows-4.0-amd64.exe /build/scrutiny-collector-metrics-windows-4.0-amd64.exe' From 3ee342763cf7f2fcd6085882bebf099160be8d39 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 24 Oct 2021 23:06:53 -0700 Subject: [PATCH 21/23] publish release using old mechanism. --- .github/workflows/release.yaml | 248 +++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 108 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 11d65ee..352da1d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,119 +64,151 @@ jobs: GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged with: version_metadata_path: ${{ github.event.inputs.version_metadata_path }} - - name: Publish Release - id: publish - uses: packagrio/action-publishr-go@master +# - name: Publish Release +# id: publish +# uses: packagrio/action-publishr-go@master +# env: +# # This is necessary in order to push a commit to the repo +# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged +# with: +# version_metadata_path: ${{ github.event.inputs.version_metadata_path }} +# upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7 /build/scrutiny-web-windows-4.0-amd64.exe /build/scrutiny-collector-metrics-windows-4.0-amd64.exe' + + + - name: Create Release + id: create_release + uses: actions/create-release@v1 env: - # This is necessary in order to push a commit to the repo - GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} with: - version_metadata_path: ${{ github.event.inputs.version_metadata_path }} - upload_assets: '/build/scrutiny-web-linux-amd64 /build/scrutiny-collector-metrics-linux-amd64 /build/scrutiny-web-linux-arm64 /build/scrutiny-collector-metrics-linux-arm64 /build/scrutiny-web-linux-arm-5 /build/scrutiny-collector-metrics-linux-arm-5 /build/scrutiny-web-linux-arm-6 /build/scrutiny-collector-metrics-linux-arm-6 /build/scrutiny-web-linux-arm-7 /build/scrutiny-collector-metrics-linux-arm-7 /build/scrutiny-web-windows-4.0-amd64.exe /build/scrutiny-collector-metrics-windows-4.0-amd64.exe' + tag_name: ${{ steps.bump_version.outputs.release_version }} + release_name: Release ${{ steps.bump_version.outputs.release_version }} + draft: false + prerelease: false + + - name: Release Asset - Web - linux-amd64 + id: upload-release-asset1 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-linux-amd64 + asset_name: scrutiny-web-linux-amd64 + asset_content_type: application/octet-stream + - name: Release Asset - Collector - linux-amd64 + id: upload-release-asset2 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-linux-amd64 + asset_name: scrutiny-collector-metrics-linux-amd64 + asset_content_type: application/octet-stream -# - name: Release Asset - Web - linux-amd64 -# id: upload-release-asset1 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-web-linux-amd64 -# asset_name: scrutiny-web-linux-amd64 -# asset_content_type: application/octet-stream -# - name: Release Asset - Collector - linux-amd64 -# id: upload-release-asset2 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-collector-metrics-linux-amd64 -# asset_name: scrutiny-collector-metrics-linux-amd64 -# asset_content_type: application/octet-stream + - name: Release Asset - Web - linux-arm64 + id: upload-release-asset3 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-linux-arm64 + asset_name: scrutiny-web-linux-arm64 + asset_content_type: application/octet-stream + - name: Release Asset - Collector - linux-arm64 + id: upload-release-asset4 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-linux-arm64 + asset_name: scrutiny-collector-metrics-linux-arm64 + asset_content_type: application/octet-stream + - name: Release Asset - Web - linux-arm-5 + id: upload-release-asset5 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-linux-arm-5 + asset_name: scrutiny-web-linux-arm-5 + asset_content_type: application/octet-stream + - name: Release Asset - Collector - linux-arm-5 + id: upload-release-asset6 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-linux-arm-5 + asset_name: scrutiny-collector-metrics-linux-arm-5 + asset_content_type: application/octet-stream -# - name: Release Asset - Web - linux-arm64 -# id: upload-release-asset3 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-web-linux-arm64 -# asset_name: scrutiny-web-linux-arm64 -# asset_content_type: application/octet-stream -# - name: Release Asset - Collector - linux-arm64 -# id: upload-release-asset4 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-collector-metrics-linux-arm64 -# asset_name: scrutiny-collector-metrics-linux-arm64 -# asset_content_type: application/octet-stream + - name: Release Asset - Web - linux-arm-6 + id: upload-release-asset7 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-linux-arm-6 + asset_name: scrutiny-web-linux-arm-6 + asset_content_type: application/octet-stream + - name: Release Asset - Collector - linux-arm-6 + id: upload-release-asset8 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-linux-arm-6 + asset_name: scrutiny-collector-metrics-linux-arm-6 + asset_content_type: application/octet-stream -# - name: Release Asset - Web - linux-arm-5 -# id: upload-release-asset5 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-web-linux-arm-5 -# asset_name: scrutiny-web-linux-arm-5 -# asset_content_type: application/octet-stream -# - name: Release Asset - Collector - linux-arm-5 -# id: upload-release-asset6 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-collector-metrics-linux-arm-5 -# asset_name: scrutiny-collector-metrics-linux-arm-5 -# asset_content_type: application/octet-stream + - name: Release Asset - Web - linux-arm-7 + id: upload-release-asset9 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-linux-arm-7 + asset_name: scrutiny-web-linux-arm-7 + asset_content_type: application/octet-stream + - name: Release Asset - Collector - linux-arm-7 + id: upload-release-asset10 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-linux-arm-7 + asset_name: scrutiny-collector-metrics-linux-arm-7 + asset_content_type: application/octet-stream -# - name: Release Asset - Web - linux-arm-6 -# id: upload-release-asset7 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-web-linux-arm-6 -# asset_name: scrutiny-web-linux-arm-6 -# asset_content_type: application/octet-stream -# - name: Release Asset - Collector - linux-arm-6 -# id: upload-release-asset8 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-collector-metrics-linux-arm-6 -# asset_name: scrutiny-collector-metrics-linux-arm-6 -# asset_content_type: application/octet-stream - -# - name: Release Asset - Web - linux-arm-7 -# id: upload-release-asset9 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-web-linux-arm-7 -# asset_name: scrutiny-web-linux-arm-7 -# asset_content_type: application/octet-stream -# - name: Release Asset - Collector - linux-arm-7 -# id: upload-release-asset10 -# uses: actions/upload-release-asset@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} -# with: -# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps -# asset_path: /build/scrutiny-collector-metrics-linux-arm-7 -# asset_name: scrutiny-collector-metrics-linux-arm-7 -# asset_content_type: application/octet-stream + - name: Release Asset - Web - windows-amd64 + id: upload-release-asset11 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-web-windows-4.0-amd64.exe + asset_name: scrutiny-web-windows-4.0-amd64.exe + asset_content_type: application/octet-stream + - name: Release Asset - Collector - windows-amd64 + id: upload-release-asset12 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: /build/scrutiny-collector-metrics-windows-4.0-amd64.exe + asset_name: scrutiny-collector-metrics-windows-4.0-amd64.exe + asset_content_type: application/octet-stream From 060ac7b83a7525c99bf2f03c26dcb3d89dafc976 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Mon, 25 Oct 2021 21:03:06 -0700 Subject: [PATCH 22/23] fixes https://github.com/AnalogJ/scrutiny/issues/179 --- webapp/backend/pkg/notify/notify.go | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp/backend/pkg/notify/notify.go b/webapp/backend/pkg/notify/notify.go index da771a5..5b81464 100644 --- a/webapp/backend/pkg/notify/notify.go +++ b/webapp/backend/pkg/notify/notify.go @@ -258,7 +258,6 @@ func (n *Notify) GenShoutrrrNotificationParams(shoutrrrUrl string) (string, *sho (*params)["title"] = subject case "slack": (*params)["title"] = subject - (*params)["thumb_url"] = logoUrl case "smtp": (*params)["subject"] = subject case "standard": From a8952eff0ca7e1cf1a7d55f2f1a25a0b99243694 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Wed, 5 Jan 2022 21:03:37 +0800 Subject: [PATCH 23/23] Improve README.md a little bit Set indentation of docker commands, and set the language of code block to enable syntax highlight in README.md --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index ec090c5..9a7a422 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,12 @@ If you're using Docker, getting started is as simple as running the following co ```bash docker run -it --rm -p 8080:8080 \ --v /run/udev:/run/udev:ro \ ---cap-add SYS_RAWIO \ ---device=/dev/sda \ ---device=/dev/sdb \ ---name scrutiny \ -analogj/scrutiny + -v /run/udev:/run/udev:ro \ + --cap-add SYS_RAWIO \ + --device=/dev/sda \ + --device=/dev/sdb \ + --name scrutiny \ + analogj/scrutiny ``` - `/run/udev` is necessary to provide the Scrutiny collector with access to your device metadata @@ -95,17 +95,17 @@ In addition to the Omnibus image (available under the `latest` tag) there are 2 ```bash docker run -it --rm -p 8080:8080 \ ---name scrutiny-web \ -analogj/scrutiny:web + --name scrutiny-web \ + analogj/scrutiny:web docker run -it --rm \ --v /run/udev:/run/udev:ro \ ---cap-add SYS_RAWIO \ ---device=/dev/sda \ ---device=/dev/sdb \ --e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \ ---name scrutiny-collector \ -analogj/scrutiny:collector + -v /run/udev:/run/udev:ro \ + --cap-add SYS_RAWIO \ + --device=/dev/sda \ + --device=/dev/sdb \ + -e SCRUTINY_API_ENDPOINT=http://SCRUTINY_WEB_IPADDRESS:8080 \ + --name scrutiny-collector \ + analogj/scrutiny:collector ``` ## Manual Installation (without-Docker) @@ -126,7 +126,7 @@ drive that Scrutiny detected. The collector is configured to run once a day, but For users of the docker Hub/Spoke deployment or manual install: initially the dashboard will be empty. After the first collector run, you'll be greeted with a list of all your hard drives and their current smart status. -``` +```bash docker exec scrutiny /scrutiny/bin/scrutiny-collector-metrics run ``` @@ -165,7 +165,7 @@ Check the `notify.urls` section of [example.scrutiny.yml](example.scrutiny.yaml) You can test that your notifications are configured correctly by posting an empty payload to the notifications health check API. -``` +```bash curl -X POST http://localhost:8080/api/health/notify ``` @@ -176,14 +176,14 @@ Scrutiny provides various methods to change the log level to debug and generate You can use environmental variables to enable debug logging and/or log files for the web server: -``` +```bash DEBUG=true SCRUTINY_LOG_FILE=/tmp/web.log ``` You can configure the log level and log file in the config file: -``` +```yml log: file: '/tmp/web.log' level: DEBUG @@ -191,7 +191,7 @@ log: Or if you're not using docker, you can pass CLI arguments to the web server during startup: -``` +```bash scrutiny start --debug --log-file /tmp/web.log ``` @@ -199,14 +199,14 @@ scrutiny start --debug --log-file /tmp/web.log You can use environmental variables to enable debug logging and/or log files for the collector: -``` +```bash DEBUG=true COLLECTOR_LOG_FILE=/tmp/collector.log ``` Or if you're not using docker, you can pass CLI arguments to the collector during startup: -``` +```bash scrutiny-collector-metrics run --debug --log-file /tmp/collector.log ```