diff --git a/.github/workflows/2_unstable.yml b/.github/workflows/2_unstable.yml
deleted file mode 100644
index 7fd72300..00000000
--- a/.github/workflows/2_unstable.yml
+++ /dev/null
@@ -1,501 +0,0 @@
-name: 2. Unstable Build, Test and Deploy
-on:
- push:
- branches:
- - unstable
- paths-ignore:
- - '**.md'
-
-jobs:
-
- frontend:
- runs-on: [self-hosted, linux, aboutcher-hosted, rocky8]
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
- - uses: actions/setup-node@v1
- with:
- node-version: 16.14.0
-
- - name: Set Version
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Install Global Dependencies
- run: npm install -g yarn sass cross-env mjml
-
- - name: Download Frontend Dependencies
- working-directory: ./frontend
- run: yarn
-
- - name: Download Go mods
- run: |
- go mod download
- go mod verify
- make test-deps
-
- - name: Build Frontend Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- run: make clean generate compile
-
- - name: Upload Compiled Frontend (rice-box.go)
- uses: actions/upload-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- build:
- needs: frontend
- runs-on: ubuntu-latest
- strategy:
- matrix:
- platform: [linux]
- arch: [386, amd64, arm-7, arm-6, arm64]
- include:
- - platform: darwin
- arch: arm64
- - platform: darwin
- arch: amd64
- - platform: windows
- arch: 386
- - platform: windows
- arch: amd64
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Add GOBIN to PATH
- run: |
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Set Linux Build Flags
- if: matrix.platform == 'linux'
- run: |
- echo "BUILD_FLAGS=-extldflags -static" >> $GITHUB_ENV
- echo "XGO_TAGS=netgo osusergo linux sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Set MacOS (Darwin) Build Flags
- if: matrix.platform == 'darwin'
- run : |
- echo "XGO_TAGS=netgo osusergo darwin sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Set Windows Build Flags
- if: matrix.platform == 'windows'
- run: |
- echo "BUILD_FLAGS=-extldflags -static -buildmode=exe" >> $GITHUB_ENV
- echo "XGO_TAGS=netgo osusergo sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Build ${{ matrix.platform }}/${{ matrix.arch }}
- uses: crazy-max/ghaction-xgo@v1
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- with:
- xgo_version: latest
- go_version: 1.17.x
- dest: build
- prefix: statping
- targets: ${{ matrix.platform }}/${{ matrix.arch }}
- v: true
- x: true
- pkg: cmd
- buildmode: pie
- tags: ${{ env.XGO_TAGS }}
- ldflags: -s -w -X main.VERSION=${{ env.VERSION }} -X main.COMMIT=${{ env.COMMIT }} ${{ env.BUILD_FLAGS }}
-
- - name: Compress Linux Builds
- if: matrix.platform == 'linux'
- run: |
- cd build
- mv statping-linux-${{ matrix.arch }} statping
- chmod +x statping
- tar -czvf statping-linux-${{ matrix.arch }}.tar.gz statping
- rm -rf statping
- echo "compressed=statping-linux-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
-
- - name: Compress Windows Builds
- if: matrix.platform == 'windows'
- run: |
- cd build
- mv statping-windows-${{ matrix.arch }}.exe statping.exe
- chmod +x statping.exe
- zip statping-windows-${{ matrix.arch }}.zip statping.exe
- rm -rf statping.exe
- echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV
-
- - name: Compress MacOS (Darwin) Builds
- if: matrix.platform == 'darwin'
- run: |
- cd build
- mv statping-darwin-${{ matrix.arch }} statping
- chmod +x statping
- tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz *
- rm -rf statping
- echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
-
- - name: Upload Compiled Statping Binary
- uses: actions/upload-artifact@v1
- with:
- name: statping-${{ matrix.platform }}-${{ matrix.arch }}
- path: ./build
-
- - name: Upload Releases
- id: upload-assets
- uses: softprops/action-gh-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- VERSION: ${{ env.VERSION }}
- with:
- tag_name: dev-v${{ env.VERSION }}
- draft: true
- prerelease: true
- files: build/${{ env.compressed }}
-
-# test:
-# needs: frontend
-# runs-on: [self-hosted, linux, aboutcher-hosted]
-# services:
-# postgres:
-# image: postgres:10.8
-# env:
-# POSTGRES_USER: root
-# POSTGRES_PASSWORD: password123
-# POSTGRES_DB: statping
-# ports:
-# - 5432:5432
-# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
-
-# mysql:
-# image: mysql:5.7
-# env:
-# MYSQL_ROOT_PASSWORD: password123
-# MYSQL_DATABASE: statping
-# ports:
-# - 3306:3306
-# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-
-# steps:
-# - uses: actions/checkout@v2
-# - uses: actions/setup-go@v2
-# with:
-# go-version: 1.17.x
-# - uses: actions/setup-node@v1
-# with:
-# node-version: 16.14.0
-
-# - name: Install Global Dependencies
-# run: npm install -g yarn sass newman cross-env wait-on @sentry/cli
-
-# - name: Setting ENV's
-# run: |
-# echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
-# echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
-# echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-
-# - name: Download Compiled Frontend (rice-box.go)
-# uses: actions/download-artifact@v1
-# with:
-# name: static-rice-box
-# path: ./source
-
-# - name: Install Statping
-# env:
-# VERSION: ${{ env.VERSION }}
-# COMMIT: ${{ github.sha }}
-# run: |
-# make build certs
-# chmod +x statping
-# mv statping $(go env GOPATH)/bin/
-
-# - name: Go Tests
-# run: |
-# go get gotest.tools/gotestsum
-# gotestsum --no-summary=skipped --format testname -- -covermode=count -coverprofile=coverage.out -p=1 ./...
-# env:
-# VERSION: ${{ env.VERSION }}
-# COMMIT: ${{ github.sha }}
-# DB_CONN: sqlite3
-# STATPING_DIR: ${{ github.workspace }}
-# API_SECRET: demopassword123
-# DISABLE_LOGS: false
-# ALLOW_REPORTS: true
-# SAMPLE_DATA: true
-# COVERALLS: ${{ secrets.COVERALLS }}
-# DISCORD_URL: ${{ secrets.DISCORD_URL }}
-# EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
-# EMAIL_USER: ${{ secrets.EMAIL_USER }}
-# EMAIL_PASS: ${{ secrets.EMAIL_PASS }}
-# EMAIL_OUTGOING: ${{ secrets.EMAIL_OUTGOING }}
-# EMAIL_SEND_TO: ${{ secrets.EMAIL_SEND_TO }}
-# EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
-# MOBILE_ID: ${{ secrets.MOBILE_ID }}
-# MOBILE_NUMBER: ${{ secrets.MOBILE_NUMBER }}
-# PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }}
-# PUSHOVER_API: ${{ secrets.PUSHOVER_API }}
-# SLACK_URL: ${{ secrets.SLACK_URL }}
-# TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
-# TELEGRAM_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL }}
-# TWILIO_SID: ${{ secrets.TWILIO_SID }}
-# TWILIO_SECRET: ${{ secrets.TWILIO_SECRET }}
-# TWILIO_FROM: ${{ secrets.TWILIO_FROM }}
-# TWILIO_TO: ${{ secrets.TWILIO_TO }}
-# TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
-# GOTIFY_URL: ${{ secrets.GOTIFY_URL }}
-# GOTIFY_TOKEN: ${{ secrets.GOTIFY_TOKEN }}
-# SNS_TOKEN: ${{ secrets.SNS_TOKEN }}
-# SNS_SECRET: ${{ secrets.SNS_SECRET }}
-# SNS_REGION: ${{ secrets.SNS_REGION }}
-# SNS_TOPIC: ${{ secrets.SNS_TOPIC }}
-
-# - name: Coveralls Testing Coverage
-# run: |
-# go get github.com/mattn/goveralls
-# goveralls -coverprofile=coverage.out -repotoken $COVERALLS
-# env:
-# COVERALLS: ${{ secrets.COVERALLS }}
-
- test-postman-sqlite:
- needs: frontend
- runs-on: [self-hosted, linux, aboutcher-hosted, centos7]
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman SQLite Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_sqlite.json
- timeoutRequest: 30000
- delayRequest: 600
-
- test-postman-mysql:
- needs: frontend
- runs-on: ubuntu-latest
-
- services:
- mysql:
- image: mysql:5.7
- env:
- MYSQL_ROOT_PASSWORD: password123
- MYSQL_DATABASE: statping
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman MySQL Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_mysql.json
- timeoutRequest: 30000
- delayRequest: 600
-
- test-postman-postgres:
- needs: frontend
- runs-on: ubuntu-latest
-
- services:
- postgres:
- image: postgres:10.8
- env:
- POSTGRES_USER: root
- POSTGRES_PASSWORD: password123
- POSTGRES_DB: statping
- ports:
- - 5432:5432
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman Postgres Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_postgres.json
- timeoutRequest: 30000
- delayRequest: 600
-
- docker-release:
- needs: [build, test-postman-sqlite, test-postman-mysql, test-postman-postgres]
- runs-on: [self-hosted, linux, aboutcher-hosted, rocky8]
-
- steps:
- - name: Checkout Statping Repo
- uses: actions/checkout@v2
-
- - name: Setting ENV's
- run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- id: buildx
- with:
- install: true
-
- - name: Cache Docker layers
- uses: actions/cache@v2
- id: buildx-docker-master
- with:
- path: /tmp/.buildx-cache
- key: buildx-docker-master
- restore-keys: |
- buildx-docker-master
-
-# - name: Docker Login
-# env:
-# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
-# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-# run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin#
-
-# - name: Docker Build :base
-# run: make buildx-base
-
- - name: Docker Login
- env:
- DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-
- - name: Docker Build :dev
- run: make buildx-dev
-
-
-# sentry-release:
-# needs: [test, test-postman-sqlite, test-postman-postgres, test-postman-mysql]
-# runs-on: [self-hosted, linux, aboutcher-hosted]
-# steps:
-# - name: Checkout Statping Repo
-# uses: actions/checkout@v2
-#
-# - name: Setup Sentry CLI
-# uses: mathrix-education/setup-sentry-cli@master
-# with:
-# version: latest
-# url: ${{ secrets.SENTRY_URL }}
-# token: ${{ secrets.SENTRY_AUTH_TOKEN }}
-# organization: statping
-#
-# - name: Setting ENV's
-# run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-#
-# - name: Sentry Release
-# run: make sentry-release
diff --git a/.github/workflows/3_stable.yml b/.github/workflows/3_stable.yml
deleted file mode 100644
index c92e0963..00000000
--- a/.github/workflows/3_stable.yml
+++ /dev/null
@@ -1,557 +0,0 @@
-name: 3. Stable Build, Test and Deploy
-on:
- push:
- branches:
- - stable
- paths-ignore:
- - '**.md'
-
-jobs:
-
- frontend:
- runs-on: [self-hosted, linux, aboutcher-hosted, rocky8]
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
- - uses: actions/setup-node@v1
- with:
- node-version: 16.14.0
-
- - name: Set Version
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Install Global Dependencies
- run: npm install -g yarn sass cross-env mjml
-
- - name: Download Frontend Dependencies
- working-directory: ./frontend
- run: yarn
-
- - name: Download Go mods
- run: |
- go mod download
- go mod verify
- make test-deps
-
- - name: Build Frontend Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- run: make clean generate compile
-
- - name: Upload Compiled Frontend (rice-box.go)
- uses: actions/upload-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
-# - name: Configure AWS credentials for Asset uploads
-# uses: aws-actions/configure-aws-credentials@v1
-# with:
-# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-# aws-region: us-west-2
-#
-# - name: Upload Static Assets to S3
-# run: |
-# tar -czvf source.tar.gz source/
-# aws s3 cp source.tar.gz s3://assets.statping.com/commit/${{ github.sha }}/
-# rm -rf source.tar.gz
-
- build:
- needs: [test-postman-sqlite, test-postman-mysql, test-postman-postgres]
- runs-on: ubuntu-latest
- strategy:
- matrix:
- platform: [linux]
- arch: [386, amd64, arm-7, arm-6, arm64]
- include:
- - platform: darwin
- arch: arm64
- - platform: darwin
- arch: amd64
- - platform: windows
- arch: 386
- - platform: windows
- arch: amd64
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
-# - name: Configure AWS credentials for Asset uploads
-# uses: aws-actions/configure-aws-credentials@v1
-# with:
-# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
-# aws-region: us-west-2
-
- - name: Add GOBIN to PATH
- run: |
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Set Linux Build Flags
- if: matrix.platform == 'linux'
- run: |
- echo "BUILD_FLAGS=-extldflags -static" >> $GITHUB_ENV
- echo "XGO_TAGS=netgo osusergo linux sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Set MacOS (Darwin) Build Flags
- if: matrix.platform == 'darwin'
- run: echo "XGO_TAGS=netgo osusergo darwin sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Set Windows Build Flags
- if: matrix.platform == 'windows'
- run: |
- echo "BUILD_FLAGS=-extldflags -static -buildmode=exe" >> $GITHUB_ENV
- echo "XGO_TAGS=netgo osusergo sqlite_omit_load_extension" >> $GITHUB_ENV
- shell: bash
-
- - name: Build ${{ matrix.platform }}/${{ matrix.arch }}
- uses: crazy-max/ghaction-xgo@v1
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- with:
- xgo_version: latest
- go_version: 1.17.x
- dest: build
- prefix: statping
- targets: ${{ matrix.platform }}/${{ matrix.arch }}
- v: false
- x: false
- pkg: cmd
- buildmode: pie
- tags: ${{ env.XGO_TAGS }}
- ldflags: -s -w -X main.VERSION=${{ env.VERSION }} -X main.COMMIT=${{ env.COMMIT }} ${{ env.BUILD_FLAGS }}
-
- - name: Compress Linux Builds
- if: matrix.platform == 'linux'
- run: |
- cd build
- mv statping-linux-${{ matrix.arch }} statping
- chmod +x statping
- tar -czvf statping-linux-${{ matrix.arch }}.tar.gz statping
- rm -rf statping
- echo "compressed=statping-linux-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
-
- - name: Compress Windows Builds
- if: matrix.platform == 'windows'
- run: |
- cd build
- mv statping-windows-${{ matrix.arch }}.exe statping.exe
- chmod +x statping.exe
- zip statping-windows-${{ matrix.arch }}.zip statping.exe
- rm -rf statping.exe
- echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV
-
- - name: Compress MacOS (Darwin) Builds
- if: matrix.platform == 'darwin'
- run: |
- cd build
- mv statping-darwin-${{ matrix.arch }} statping
- chmod +x statping
- tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz statping
- rm -rf statping
- echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
-
- - name: Upload Compiled Statping Binary
- uses: actions/upload-artifact@v1
- with:
- name: statping-${{ matrix.platform }}-${{ matrix.arch }}
- path: ./build
-
- - name: Upload Releases
- id: upload-assets
- uses: softprops/action-gh-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- VERSION: ${{ env.VERSION }}
- with:
- tag_name: v${{ env.VERSION }}
- draft: true
- prerelease: true
- files: build/${{ env.compressed }}
-
-# - name: Upload Compiled Binaries to S3
-# run: |
-# aws s3 cp build/${{ env.compressed }} s3://assets.statping.com/commit/${{ github.sha }}/
-
-# test:
-# needs: frontend
-# runs-on: ubuntu-latest
-# services:
-# postgres:
-# image: postgres:10.8
-# env:
-# POSTGRES_USER: root
-# POSTGRES_PASSWORD: password123
-# POSTGRES_DB: statping
-# ports:
-# - 5432:5432
-# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
-#
-# mysql:
-# image: mysql:5.7
-# env:
-# MYSQL_ROOT_PASSWORD: password123
-# MYSQL_DATABASE: statping
-# ports:
-# - 3306:3306
-# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-#
-# steps:
-# - uses: actions/checkout@v2
-# - uses: actions/setup-go@v2
-# with:
-# go-version: 1.17.x
-# - uses: actions/setup-node@v1
-# with:
-# node-version: 16.14.0
-#
-# - name: Install Global Dependencies
-# run: npm install -g yarn sass newman cross-env wait-on @sentry/cli
-#
-# - name: Setting ENV's
-# run: |
-# echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
-# echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
-# echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-#
-# - name: Download Compiled Frontend (rice-box.go)
-# uses: actions/download-artifact@v1
-# with:
-# name: static-rice-box
-# path: ./source
-#
-# - name: Install Statping
-# env:
-# VERSION: ${{ env.VERSION }}
-# COMMIT: ${{ github.sha }}
-# run: |
-# make build certs
-# chmod +x statping
-# mv statping $(go env GOPATH)/bin/
-#
-# - name: Go Tests
-# run: |
-# go get gotest.tools/gotestsum
-# gotestsum --no-summary=skipped --format testname -- -covermode=count -coverprofile=coverage.out -p=1 ./...
-# env:
-# VERSION: ${{ env.VERSION }}
-# COMMIT: ${{ github.sha }}
-# DB_CONN: sqlite3
-# STATPING_DIR: ${{ github.workspace }}
-# API_SECRET: demopassword123
-# DISABLE_LOGS: false
-# ALLOW_REPORTS: true
-# SAMPLE_DATA: true
-# COVERALLS: ${{ secrets.COVERALLS }}
-# DISCORD_URL: ${{ secrets.DISCORD_URL }}
-# EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
-# EMAIL_USER: ${{ secrets.EMAIL_USER }}
-# EMAIL_PASS: ${{ secrets.EMAIL_PASS }}
-# EMAIL_OUTGOING: ${{ secrets.EMAIL_OUTGOING }}
-# EMAIL_SEND_TO: ${{ secrets.EMAIL_SEND_TO }}
-# EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
-# MOBILE_ID: ${{ secrets.MOBILE_ID }}
-# MOBILE_NUMBER: ${{ secrets.MOBILE_NUMBER }}
-# PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }}
-# PUSHOVER_API: ${{ secrets.PUSHOVER_API }}
-# SLACK_URL: ${{ secrets.SLACK_URL }}
-# TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
-# TELEGRAM_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL }}
-# TWILIO_SID: ${{ secrets.TWILIO_SID }}
-# TWILIO_SECRET: ${{ secrets.TWILIO_SECRET }}
-# TWILIO_FROM: ${{ secrets.TWILIO_FROM }}
-# TWILIO_TO: ${{ secrets.TWILIO_TO }}
-# TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
-# GOTIFY_URL: ${{ secrets.GOTIFY_URL }}
-# GOTIFY_TOKEN: ${{ secrets.GOTIFY_TOKEN }}
-# SNS_TOKEN: ${{ secrets.SNS_TOKEN }}
-# SNS_SECRET: ${{ secrets.SNS_SECRET }}
-# SNS_REGION: ${{ secrets.SNS_REGION }}
-# SNS_TOPIC: ${{ secrets.SNS_TOPIC }}
-#
-# - name: Coveralls Testing Coverage
-# run: |
-# go get github.com/mattn/goveralls
-# goveralls -coverprofile=coverage.out -repotoken $COVERALLS
-# env:
-# COVERALLS: ${{ secrets.COVERALLS }}
-
- test-postman-sqlite:
- needs: frontend
- runs-on: [self-hosted, linux, aboutcher-hosted, centos7]
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman SQLite Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_sqlite.json
- timeoutRequest: 30000
- delayRequest: 600
-
- test-postman-mysql:
- needs: frontend
- runs-on: ubuntu-latest
-
- services:
- mysql:
- image: mysql:5.7
- env:
- MYSQL_ROOT_PASSWORD: password123
- MYSQL_DATABASE: statping
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman MySQL Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_mysql.json
- timeoutRequest: 30000
- delayRequest: 600
-
- test-postman-postgres:
- needs: frontend
- runs-on: ubuntu-latest
-
- services:
- postgres:
- image: postgres:10.8
- env:
- POSTGRES_USER: root
- POSTGRES_PASSWORD: password123
- POSTGRES_DB: statping
- ports:
- - 5432:5432
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.17.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8585 > /dev/null &
- sleep 5
- - name: Postman Postgres Tests
- uses: matt-ball/newman-action@master
- with:
- apiKey: ${{ secrets.POSTMAN_API }}
- collection: ./dev/postman.json
- environment: ./dev/postman_env_postgres.json
- timeoutRequest: 30000
- delayRequest: 600
-
- docker-release:
- needs: build
- runs-on: [self-hosted, linux, aboutcher-hosted, rocky8]
- steps:
- - name: Checkout Statping Repo
- uses: actions/checkout@v2
-
- - name: Setting ENV's
- run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- id: buildx
- with:
- install: true
-
- - name: Cache Docker layers
- uses: actions/cache@v2
- id: buildx-docker
- with:
- path: /tmp/.buildx-cache
- key: buildx-docker
- restore-keys: |
- buildx-docker
-
-# - name: Docker Login
-# env:
-# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
-# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
-# run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-#
-# - name: Docker Build :base
-# run: make buildx-base
-
- - name: Docker Login
- env:
- DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-
- - name: Docker Build :lastest
- run: make buildx-latest
-
-# sentry-release:
-# needs: docker-release
-# runs-on: ubuntu-latest
-# steps:
-# - name: Checkout Statping Repo
-# uses: actions/checkout@v2
-#
-# - name: Setup Sentry CLI
-# uses: mathrix-education/setup-sentry-cli@master
-# with:
-# version: latest
-# url: ${{ secrets.SENTRY_URL }}
-# token: ${{ secrets.SENTRY_AUTH_TOKEN }}
-# organization: statping
-#
-# - name: Setting ENV's
-# run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-#
-# - name: Sentry Release
-# run: make sentry-release
-
-# homebrew-release:
-# needs: docker-release
-# runs-on: ubuntu-latest
-# steps:
-# - name: Checkout Statping Repo
-# uses: actions/checkout@v2
-#
-# - name: Setting ENV's
-# run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-#
-# - name: Update Homebrew Package
-# env:
-# VERSION: ${{ env.VERSION }}
-# TRAVIS_API: ${{ secrets.TRAVIS_API }}
-# run: make publish-homebrew
-#
-# slack-update:
-# needs: docker-release
-# runs-on: ubuntu-latest
-# steps:
-# - name: Checkout Statping Repo
-# uses: actions/checkout@v2
-#
-# - name: Setting ENV's
-# run: echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
-# shell: bash
-#
-# - name: Slack Notification
-# uses: rtCamp/action-slack-notify@master
-# env:
-# SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
-# SLACK_CHANNEL: dev
-# SLACK_USERNAME: StatpingDev
diff --git a/.github/workflows/1_dev.yml b/.github/workflows/build.yml
similarity index 57%
rename from .github/workflows/1_dev.yml
rename to .github/workflows/build.yml
index 7b00d255..fb8cd111 100644
--- a/.github/workflows/1_dev.yml
+++ b/.github/workflows/build.yml
@@ -1,53 +1,97 @@
-name: 1. Development Build and Testing
+name: Statping build
on:
push:
- branches:
- - dev
paths-ignore:
- - '**.md'
+ - "**.md"
+ pull_request:
+ paths-ignore:
+ - "**.md"
jobs:
-
+ data:
+ # this job collects general variables and inputs for later use.
+ # not all of them might be needed but having them in a central place is more helpful than 100% efficiency.
+ # also, the name is intentionally short to make later references shorter.
+ runs-on: ubuntu-latest
+ outputs:
+ is_release: ${{ steps.statping-versions.outputs.is_release }}
+ is_prerelease: ${{ steps.statping-versions.outputs.is_prerelease }}
+ # this will be v1.2.3 for on-tag builds and v1.2.3-numberofcommits-sha for off-tag builds
+ version: ${{ steps.statping-versions.outputs.version }}
+ go_version: ${{ steps.tool-versions.outputs.go_version }}
+ node_version: ${{ steps.tool-versions.outputs.node_version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ # check on https://github.com/actions/checkout/pull/579 occasionally if actions/checkout can do this natively yet
+ fetch-depth: 0
+ - name: get statping version information
+ id: statping-versions
+ run: |
+ STABLE_TAG=$(git describe --tags --exclude '*-*')
+ BETA_TAG=$(git describe --tags --match '*-*')
+ echo "stable_tag=$STABLE_TAG" >> $GITHUB_OUTPUT
+ echo "beta_tag=$BETA_TAG" >> $GITHUB_OUTPUT
+ if [ "${{ github.ref }}" = "refs/tags/$STABLE_TAG" ]; then
+ echo "is_release=true" >> $GITHUB_OUTPUT
+ echo "is_prerelease=false" >> $GITHUB_OUTPUT
+ echo "version=$STABLE_TAG" >> $GITHUB_OUTPUT
+ elif [ "${{ github.ref }}" = "refs/tags/$BETA_TAG" ]; then
+ echo "is_release=true" >> $GITHUB_OUTPUT
+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
+ echo "version=$BETA_TAG" >> $GITHUB_OUTPUT
+ else
+ echo "is_release=false" >> $GITHUB_OUTPUT
+ echo "is_prerelease=false" >> $GITHUB_OUTPUT
+ echo "version=$STABLE_TAG" >> $GITHUB_OUTPUT
+ fi
+ shell: bash
+ - name: get go/node version information
+ id: tool-versions
+ run: |
+ echo "go_version=1.20.x" >> $GITHUB_OUTPUT
+ echo "node_version=16.14.0" >> $GITHUB_OUTPUT
+ shell: bash
+ - name: show data results
+ run: |
+ echo == tools versions ==
+ echo go_version: ${{ steps.tool-versions.outputs.go_version }}
+ echo node_version: ${{ steps.tool-versions.outputs.node_version }}
+ echo == matched tags ==
+ echo stable_tag: ${{ steps.versions.outputs.stable_tag }}
+ echo beta_tag: ${{ steps.versions.outputs.beta_tag }}
+ echo == release information ==
+ echo is_release: ${{ steps.versions.outputs.is_release }}
+ echo is_prerelease: ${{ steps.versions.outputs.is_prerelease }}
+ echo == statping version ==
+ echo version: ${{ steps.versions.outputs.version }}
frontend:
runs-on: ubuntu-latest
+ needs: data
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
- go-version: 1.17.x
+ go-version: ${{ needs.data.outputs.go_version }}
+ - name: Install rice
+ run: go install github.com/GeertJohan/go.rice/rice@latest
- uses: actions/setup-node@v1
with:
- node-version: 16.14.0
-
- - name: Set Version
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Install Global Dependencies
- run: npm install -g yarn sass cross-env mjml
-
+ node-version: ${{ needs.data.outputs.node_version }}
- name: Download Frontend Dependencies
working-directory: ./frontend
run: yarn
-
- - name: Download Go mods
- run: |
- go mod download
- go mod verify
- make test-deps
-
- name: Build Frontend Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- run: make clean generate compile
-
+ working-directory: ./frontend
+ run: yarn build
+ - name: Copy built frontend
+ run: |
+ cp -r frontend/dist source/
+ cp -r frontend/src/assets/scss source/dist/
+ cp frontend/public/robots.txt source/dist/
+ - name: Build rice-box.go
+ run: rice embed-go
+ working-directory: source
- name: Upload Compiled Frontend (rice-box.go)
uses: actions/upload-artifact@v1
with:
@@ -55,21 +99,22 @@ jobs:
path: ./source
build:
- needs: frontend
+ needs: [ data, frontend ]
runs-on: ubuntu-latest
strategy:
matrix:
- platform: [linux]
- arch: [386, amd64, arm-7, arm-6, arm64]
+ platform: [ linux ]
+ arch: [ 386, amd64, arm-7, arm-6, arm64 ]
include:
+ # TODO darwin/386 is broken, ignore for now
+ # - platform: darwin
+ # arch: 386
- platform: darwin
- arch: arm64
- - platform: darwin
+ arch: amd64
+ - platform: windows
arch: amd64
- platform: windows
arch: 386
- - platform: windows
- arch: amd64
steps:
- uses: actions/checkout@v2
@@ -80,11 +125,6 @@ jobs:
name: static-rice-box
path: ./source
- - name: Add GOBIN to PATH
- run: |
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- name: Set Linux Build Flags
if: matrix.platform == 'linux'
run: |
@@ -92,9 +132,9 @@ jobs:
echo "XGO_TAGS=netgo osusergo linux sqlite_omit_load_extension" >> $GITHUB_ENV
shell: bash
- - name: Set MacOS (Darwin) Build Flags
+ - name: Set Darwin Build Flags
if: matrix.platform == 'darwin'
- run : |
+ run: |
echo "XGO_TAGS=netgo osusergo darwin sqlite_omit_load_extension" >> $GITHUB_ENV
shell: bash
@@ -106,22 +146,22 @@ jobs:
shell: bash
- name: Build ${{ matrix.platform }}/${{ matrix.arch }}
- uses: crazy-max/ghaction-xgo@v1
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
+ uses: crazy-max/ghaction-xgo@v2
with:
xgo_version: latest
- go_version: 1.17.x
+ go_version: ${{ needs.data.outputs.go_version }}
dest: build
prefix: statping
targets: ${{ matrix.platform }}/${{ matrix.arch }}
+ # v and x enable additional debug output
v: true
x: true
pkg: cmd
buildmode: pie
tags: ${{ env.XGO_TAGS }}
- ldflags: -s -w -X main.VERSION=${{ env.VERSION }} -X main.COMMIT=${{ env.COMMIT }} ${{ env.BUILD_FLAGS }}
+ ldflags: -s -w -X main.VERSION=${{ needs.data.outputs.version }} -X main.COMMIT=${{ github.sha }} ${{ env.BUILD_FLAGS }}
+
+ - run: ls -la build
- name: Compress Linux Builds
if: matrix.platform == 'linux'
@@ -143,24 +183,28 @@ jobs:
rm -rf statping.exe
echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV
- - name: Compress MacOS (Darwin) Builds
+ - name: Compress Darwin Builds
if: matrix.platform == 'darwin'
run: |
cd build
mv statping-darwin-${{ matrix.arch }} statping
chmod +x statping
- tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz *
+ tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz statping
rm -rf statping
echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
- name: Upload Compiled Statping Binary
uses: actions/upload-artifact@v1
with:
- name: statping-${{ matrix.platform }}-${{ matrix.arch }}
+ name: binaries
path: ./build
+ # TODO refactor (and fix) tests
+
test:
- needs: frontend
+ needs: [ data, frontend ]
+ # temporarily disabled
+ if: "false"
runs-on: ubuntu-latest
services:
postgres:
@@ -186,10 +230,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
- go-version: 1.17.x
+ go-version: ${{ needs.data.outputs.go_version }}
- uses: actions/setup-node@v1
with:
- node-version: 16.14.0
+ node-version: ${{ needs.data.outputs.node_version }}
- name: Install Global Dependencies
run: npm install -g yarn sass newman cross-env wait-on @sentry/cli
@@ -197,8 +241,7 @@ jobs:
- name: Setting ENV's
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
+ echo "/opt/hostedtoolcache/node/${{ needs.data.outputs.node_version }}/x64/bin" >> $GITHUB_PATH
shell: bash
- name: Download Compiled Frontend (rice-box.go)
@@ -208,9 +251,6 @@ jobs:
path: ./source
- name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
run: |
make build certs
chmod +x statping
@@ -221,7 +261,7 @@ jobs:
go get gotest.tools/gotestsum
gotestsum --no-summary=skipped --format testname -- -covermode=count -coverprofile=coverage.out -p=1 ./...
env:
- VERSION: ${{ env.VERSION }}
+ VERSION: ${{ needs.data.outputs.version }}
COMMIT: ${{ github.sha }}
DB_CONN: sqlite3
STATPING_DIR: ${{ github.workspace }}
@@ -241,7 +281,7 @@ jobs:
MOBILE_NUMBER: ${{ secrets.MOBILE_NUMBER }}
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }}
PUSHOVER_API: ${{ secrets.PUSHOVER_API }}
- SLACK_URL: https://hooks.slack.com/services/TTJ1B90DP/RENU20O9M/9uI823SUnYBuGcxYlpSimD6H
+ SLACK_URL: ${{ secrets.SLACK_URL }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL }}
TWILIO_SID: ${{ secrets.TWILIO_SID }}
@@ -256,27 +296,26 @@ jobs:
SNS_REGION: ${{ secrets.SNS_REGION }}
SNS_TOPIC: ${{ secrets.SNS_TOPIC }}
-# - name: Coveralls Testing Coverage
-# run: |
-# go get github.com/mattn/goveralls
-# goveralls -coverprofile=coverage.out -repotoken $COVERALLS
-# env:
-# COVERALLS: ${{ secrets.COVERALLS }}
+ - name: Coveralls Testing Coverage
+ run: |
+ go get github.com/mattn/goveralls
+ goveralls -coverprofile=coverage.out -repotoken $COVERALLS
+ env:
+ COVERALLS: ${{ secrets.COVERALLS }}
test-postman-sqlite:
- needs: frontend
+ needs: [ data, frontend ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
- go-version: 1.17.x
+ go-version: ${{ needs.data.outputs.go_version }}
- name: Setting ENV's
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
+ echo "/opt/hostedtoolcache/node/${{ needs.data.outputs.node_version }}/x64/bin" >> $GITHUB_PATH
shell: bash
- name: Download Compiled Frontend (rice-box.go)
@@ -286,9 +325,6 @@ jobs:
path: ./source
- name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
run: |
make build
chmod +x statping
@@ -307,7 +343,7 @@ jobs:
delayRequest: 600
test-postman-mysql:
- needs: frontend
+ needs: [ data, frontend ]
runs-on: ubuntu-latest
services:
@@ -324,13 +360,12 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
- go-version: 1.17.x
+ go-version: ${{ needs.data.outputs.go_version }}
- name: Setting ENV's
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
+ echo "/opt/hostedtoolcache/node/${{ needs.data.outputs.node_version }}/x64/bin" >> $GITHUB_PATH
shell: bash
- name: Download Compiled Frontend (rice-box.go)
@@ -340,11 +375,6 @@ jobs:
path: ./source
- name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- MJML_APP: ${{ secrets.MJML_APP }}
- MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }}
run: |
make build
chmod +x statping
@@ -363,7 +393,7 @@ jobs:
delayRequest: 600
test-postman-postgres:
- needs: frontend
+ needs: [ data, frontend ]
runs-on: ubuntu-latest
services:
@@ -381,13 +411,12 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
- go-version: 1.17.x
+ go-version: ${{ needs.data.outputs.go_version }}
- name: Setting ENV's
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
+ echo "/opt/hostedtoolcache/node/${{ needs.data.outputs.node_version }}/x64/bin" >> $GITHUB_PATH
shell: bash
- name: Download Compiled Frontend (rice-box.go)
@@ -397,9 +426,6 @@ jobs:
path: ./source
- name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
run: |
make build
chmod +x statping
@@ -416,3 +442,57 @@ jobs:
environment: ./dev/postman_env_postgres.json
timeoutRequest: 30000
delayRequest: 600
+
+ docker-build:
+ needs: [ data ]
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: jemand771/docker-build-action@main
+ with:
+ GITHUB_TOKEN: ${{ github.token }}
+ push_strategy: artifact
+ platforms: linux/amd64
+ args: |
+ COMMIT=${{ github.sha }}
+ VERSION=${{ needs.data.outputs.version }}
+ BUILDKIT_INLINE_CACHE=true
+
+ # all other release jobs should be based on this
+ release:
+ # only run release jobs on push to stable/unstable.
+ if: ${{ success() && fromJSON(needs.data.outputs.is_release) }}
+ needs: [ data, build, test-postman-sqlite, test-postman-mysql, test-postman-postgres, docker-build ]
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: binaries
+ path: binaries
+ - uses: actions/download-artifact@v3
+ with:
+ name: docker-images
+ path: images
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v2
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ github.token }}
+ - uses: ncipollo/release-action@v1
+ with:
+ allowUpdates: true
+ artifactErrorsFailBuild: true
+ artifacts: binaries/*
+ draft: true
+ generateReleaseNotes: true
+ omitBodyDuringUpdate: true
+ prerelease: ${{ fromJSON(needs.data.outputs.is_prerelease) && 'true' || 'false'}}
+ updateOnlyUnreleased: true
+ - name: import images
+ run: for file in images/*.tar; do docker load < $file; done
+ - run: docker image ls
+ - name: push all images
+ run: for image in $(cat images/docker-images.txt); do echo pushing $image; docker push $image; done
+ # TODO bring back dockerhub image
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
deleted file mode 100644
index 30cd68c1..00000000
--- a/.github/workflows/pr.yml
+++ /dev/null
@@ -1,173 +0,0 @@
-name: Push Request Testing
-on:
- push:
- branches:
- - '*' # matches every branch
- - '*/*' # matches every branch containing a single '/'
- - '!master' # excludes master
- - '!dev' # excludes dev
- pull_request:
- branches:
- - '*' # matches every branch
- - '*/*' # matches every branch containing a single '/'
- - '!master' # excludes master
- - '!dev' # excludes dev
-
-
-jobs:
- compile:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/setup-go@v2
- with:
- go-version: '1.17.8'
- - uses: actions/setup-node@v1
- with:
- node-version: '16.14.0'
- - uses: actions/checkout@v2
-
- - name: Add GOBIN to PATH
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Install Global Dependencies
- run: npm install -g yarn sass cross-env
-
- - name: Download Frontend Dependencies
- if: steps.nodecache.outputs.cache-hit != 'true'
- working-directory: ./frontend
- run: yarn
-
- - name: Download Go mods
- if: steps.golangcache.outputs.cache-hit != 'true'
- run: |
- go mod download
- go mod verify
- make test-deps
-
- - name: Build Frontend Statping
- run: make clean compile
-
- - name: Upload Compiled Frontend (rice-box.go)
- uses: actions/upload-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- pr-test:
- needs: compile
- runs-on: ubuntu-latest
-
- services:
- postgres:
- image: postgres:10.8
- env:
- POSTGRES_USER: root
- POSTGRES_PASSWORD: password123
- POSTGRES_DB: statping
- ports:
- - 5432:5432
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
-
- mysql:
- image: mysql:5.7
- env:
- MYSQL_ROOT_PASSWORD: password123
- MYSQL_DATABASE: statping
- ports:
- - 3306:3306
- options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-
- steps:
- - uses: actions/setup-go@v2
- with:
- go-version: 1.15.x
- - uses: actions/setup-node@v1
- with:
- node-version: 16.14.0
- - uses: actions/checkout@v2
-
- - name: Install Global Dependencies
- run: |
- go get gotest.tools/gotestsum
- npm install -g yarn sass newman cross-env wait-on @sentry/cli
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- run: |
- make build certs
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
-
- - name: Go Tests
- run: |
- SASS=`which sass` gotestsum --no-summary=skipped --format testname -- -covermode=count -coverprofile=coverage.out -p=1 ./...
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- DB_CONN: sqlite3
- STATPING_DIR: ${{ github.workspace }}
- API_SECRET: demopassword123
- DISABLE_LOGS: false
- ALLOW_REPORTS: true
- PUSH_REQUEST: true
-
- pr-test-postman:
- needs: compile
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-go@v2
- with:
- go-version: 1.15.x
-
- - name: Setting ENV's
- run: |
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- echo "/opt/hostedtoolcache/node/16.14.0/x64/bin" >> $GITHUB_PATH
- echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV
- shell: bash
-
- - name: Download Compiled Frontend (rice-box.go)
- uses: actions/download-artifact@v1
- with:
- name: static-rice-box
- path: ./source
-
- - name: Install Statping
- env:
- VERSION: ${{ env.VERSION }}
- COMMIT: ${{ github.sha }}
- run: |
- make build
- chmod +x statping
- mv statping $(go env GOPATH)/bin/
-
- - name: Run Statping
- run: |
- API_SECRET=demosecret123 statping --port=8080 > /dev/null &
- sleep 3
-
- - name: Postman Tests
- uses: matt-ball/newman-action@master
- with:
- collection: ./dev/postman.json
- environment: ./dev/postman_environment_sqlite.json
- timeoutRequest: 15000
- delayRequest: 500
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..2abbb4b7
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "source/statping-ng.wiki"]
+ path = source/statping-ng.wiki
+ # TODO should this be a relative path? (would require wiki fork for statping forks)
+ url = https://github.com/statping-ng/statping-ng.wiki.git
diff --git a/Dockerfile b/Dockerfile
index 6997cc18..4d79b78d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,7 @@ RUN yarn build && yarn cache clean
# Statping Golang BACKEND building from source
# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying
-FROM golang:1.17-alpine AS backend
+FROM golang:1.20-alpine AS backend
LABEL maintainer="Statping-NG (https://github.com/statping-ng)"
ARG VERSION
ARG COMMIT
@@ -21,7 +21,7 @@ RUN apk add --update --no-cache libstdc++ gcc g++ make git autoconf \
update-ca-certificates
WORKDIR /root
-RUN git clone https://github.com/sass/sassc.git
+RUN git clone --depth 1 --branch 3.6.2 https://github.com/sass/sassc.git
RUN . sassc/script/bootstrap && make -C sassc -j4
# sassc binary: /root/sassc/bin/sassc
@@ -30,15 +30,17 @@ ADD go.mod go.sum ./
RUN go mod download
ENV GO111MODULE on
ENV CGO_ENABLED 1
-RUN go get github.com/stretchr/testify/assert && \
- go get github.com/stretchr/testify/require && \
- go get github.com/GeertJohan/go.rice/rice && \
- go get github.com/cortesi/modd/cmd/modd && \
- go get github.com/crazy-max/xgo
-COPY . .
+COPY cmd ./cmd
+COPY database ./database
+COPY handlers ./handlers
+COPY notifiers ./notifiers
+COPY source ./source
+COPY types ./types
+COPY utils ./utils
COPY --from=frontend /statping/dist/ ./source/dist/
-RUN make clean generate embed
-RUN go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=${VERSION} -X main.COMMIT=${COMMIT}" -o statping --tags "netgo linux" ./cmd
+RUN go install github.com/GeertJohan/go.rice/rice@latest
+RUN cd source && rice embed-go
+RUN go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=$VERSION -X main.COMMIT=$COMMIT" -o statping --tags "netgo linux" ./cmd
RUN chmod a+x statping && mv statping /go/bin/statping
# /go/bin/statping - statping binary
# /root/sassc/bin/sassc - sass binary
diff --git a/Dockerfile.base b/Dockerfile.base
deleted file mode 100644
index 920b20f5..00000000
--- a/Dockerfile.base
+++ /dev/null
@@ -1,45 +0,0 @@
-FROM node:16.14.0-alpine AS frontend
-LABEL maintainer="Statping-ng (https://github.com/statping-ng)"
-ARG BUILDPLATFORM
-WORKDIR /statping
-COPY ./frontend/package.json .
-COPY ./frontend/yarn.lock .
-RUN yarn install --pure-lockfile --network-timeout 1000000
-COPY ./frontend .
-RUN yarn build && yarn cache clean
-
-# Statping Golang BACKEND building from source
-# Creates "/go/bin/statping" and "/usr/local/bin/sass" for copying
-FROM golang:1.17-alpine AS backend
-LABEL maintainer="Statping-NG (https://github.com/statping-ng)"
-ARG VERSION
-ARG COMMIT
-ARG BUILDPLATFORM
-ARG TARGETARCH
-RUN apk add --update --no-cache libstdc++ gcc g++ make git autoconf \
- libtool ca-certificates linux-headers wget curl jq && \
- update-ca-certificates
-
-WORKDIR /root
-RUN git clone https://github.com/sass/sassc.git
-RUN . sassc/script/bootstrap && make -C sassc -j4
-# sassc binary: /root/sassc/bin/sassc
-
-WORKDIR /go/src/github.com/statping-ng/statping-ng
-ADD go.mod go.sum ./
-RUN go mod download
-ENV GO111MODULE on
-ENV CGO_ENABLED 1
-RUN go get github.com/stretchr/testify/assert && \
- go get github.com/stretchr/testify/require && \
- go get github.com/GeertJohan/go.rice/rice && \
- go get github.com/cortesi/modd/cmd/modd && \
- go get github.com/crazy-max/xgo
-COPY . .
-COPY --from=frontend /statping/dist/ ./source/dist/
-RUN make clean generate embed
-RUN go build -a -ldflags "-s -w -extldflags -static -X main.VERSION=${VERSION} -X main.COMMIT=${COMMIT}" -o statping --tags "netgo linux" ./cmd
-RUN chmod a+x statping && mv statping /go/bin/statping
-# /go/bin/statping - statping binary
-# /root/sassc/bin/sassc - sass binary
-# /statping - Vue frontend (from frontend)
diff --git a/cmd/main.go b/cmd/main.go
index e4453c01..57294527 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -19,7 +19,7 @@ import (
var (
// VERSION stores the current version of Statping
- VERSION string
+ VERSION string = "dev"
// COMMIT stores the git commit hash for this version of Statping
COMMIT string
log = utils.Log.WithField("type", "cmd")
@@ -83,7 +83,7 @@ func start() {
log.Errorf("Statping Log Error: %v\n", err)
}
- log.Info(fmt.Sprintf("Starting Statping v%s", VERSION))
+ log.Info(fmt.Sprintf("Starting Statping %s", VERSION))
utils.Params.Set("SERVER_IP", ipAddress)
utils.Params.Set("SERVER_PORT", port)
diff --git a/dev/maintainer-docs.md b/dev/maintainer-docs.md
new file mode 100644
index 00000000..6ae54f1e
--- /dev/null
+++ b/dev/maintainer-docs.md
@@ -0,0 +1,42 @@
+# Statping-ng maintainer documentation
+This document will briefly outline our workflows and give instructions on some common tasks.
+
+Feel free to expand this; at the moment it's pretty empty here.
+
+
+## GitHub actions
+Binaries and docker images get built automatically by GitHub actions.
+If the builds succeed, tests are run to ensure nothing is completely broken.
+Build artifacts can be downloaded from the actions tab on GitHub.
+
+This happens on every push to this repo and on every pull request update.
+
+
+## Releases
+We used to have a model of "stable" and "unstable" releases, which would get triggered by pushing to a respective release branch.
+The new system tries to address some of the issues with the old system and simplifies the workflow definitions.
+
+Incoming pull requests are merged into the `main` (default) branch.
+Once you feel like we have enough new changes to justify a release, a tag can be created.
+This is **not** a GitHub release and sadly can't be done from github.com directly.
+Either
+* create a stable release ready for general usage as `v{major}.{minor}.{patch}`, e.g. `v1.2.3`
+* or create a beta release intended for testing as `v{major}.{minor}.{patch}-{suffix}`, e.g. `v1.2.3-rc0`
+ * personal note: I don't know what a good format for suffixes is. I'm not even sure if we _need_ beta releases long term. We'll see; I'm open to suggestions
+
+To create a tag from your local workspace, run
+```bash
+git checkout main
+git pull
+git tag v1.2.3
+git push origin v1.2.3
+```
+You can also create tags on different branches (e.g. for backports).
+Remember to check out the revision you want to tag _before_ tagging.
+Do not move existing (pushed) tags!
+
+When a new tag is pushed, the same build+test actions described above run, but additionally the built docker images are pushed and a draft release on GitHub is created.
+All artifacts will get attached to that release.
+
+The release will be in draft mode to allow last minute changes if necessary.
+Untick the draft checkbox if everything looks alright.
diff --git a/dev/postman.json b/dev/postman.json
index cd061232..03e868b2 100644
--- a/dev/postman.json
+++ b/dev/postman.json
@@ -766,105 +766,6 @@
"description": "You can create custom badges with dynamic information by using [Shields.io](https://shields.io/) and parsing JSON fields with [JSONPath](http://jsonpath.com/). \n\n## Examples\n\n#### Service Uptime Percent\n
\n\n- URL: [https://demo.statping.com/api/services/2](https://demo.statping.com/api/services/2)\n- JSON Path: `$.online_24_hours`\n- Suffix: `%`\n\n```\nhttps://img.shields.io/badge/dynamic/json?color=blue&label=%20Statping%20Uptime&query=%24.online_24_hours&url=https%3A%2F%2Fdemo.statping.com%2Fapi%2Fservices%2F2&suffix=%\n```\n\n#### Count Services\n
\n\n- URL: [https://demo.statping.com/health](https://demo.statping.com/health)\n- JSON Path: `$.services`\n- Suffix: ` services`\n\n```\nhttps://img.shields.io/badge/dynamic/json?color=purple&label=Demo%20Site&query=%24.services&url=https://demo.statping.com/health&suffix=%20services\n```"
},
"response": []
- },
- {
- "name": "Send Push Notification",
- "event": [
- {
- "listen": "test",
- "script": {
- "id": "11fe392f-3636-4d2d-84e9-1119b351d8ee",
- "exec": [
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "auth": {
- "type": "noauth"
- },
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"notifications\": [\n {\n \"tokens\": [\"dBLB1WvTJkiWl3ZPjP0-BS:APA91bGXUbKy65CaN1XqExHXZ892jik2k9XORXSiqdUyXhcQ5RDiJ6LfXrckuH3StYJFcma4UCDr_N038YUtxYsRIHYx_8vWZ6D2uq3199LegWXGl5tz-9zk3M4WZGX8WGxIRUJ31QtW\"],\n \"platform\": 2,\n \"message\": \"This notification will go to iOS and Android platform via Firebase!\"\n }\n ]\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "https://push.statping.com/api/push",
- "protocol": "https",
- "host": [
- "push",
- "statping",
- "com"
- ],
- "path": [
- "api",
- "push"
- ]
- },
- "description": "Send a push notification to the Statping mobile app using your Firebase device identifier."
- },
- "response": [
- {
- "name": "Send Push Notification",
- "originalRequest": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"notifications\": [\n {\n \"tokens\": [\"dBLB1WvTJkiWl3ZPjP0-BS:APA91bGXUbKy65CaN1XqExHXZ892jik2k9XORXSiqdUyXhcQ5RDiJ6LfXrckuH3StYJFcma4UCDr_N038YUtxYsRIHYx_8vWZ6D2uq3199LegWXGl5tz-9zk3M4WZGX8WGxIRUJ31QtW\"],\n \"platform\": 2,\n \"message\": \"This notification will go to iOS and Android Statping App\"\n }\n ]\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "https://push.statping.com/api/push",
- "protocol": "https",
- "host": [
- "push",
- "statping",
- "com"
- ],
- "path": [
- "api",
- "push"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Content-Length",
- "value": "37"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Date",
- "value": "Thu, 13 Aug 2020 02:24:17 GMT"
- },
- {
- "key": "X-Gorush-Version",
- "value": "No Version Provided"
- }
- ],
- "cookie": [],
- "body": "{\n \"counts\": 1,\n \"logs\": [],\n \"success\": \"ok\"\n}"
- }
- ]
}
],
"description": "This is for Statping's miscellaneous API endpoints that aren't a part of another category.",
diff --git a/frontend/src/components/Index/Footer.vue b/frontend/src/components/Index/Footer.vue
index eff3e58d..c0a7aa3a 100644
--- a/frontend/src/components/Index/Footer.vue
+++ b/frontend/src/components/Index/Footer.vue
@@ -7,7 +7,7 @@
- Statping v{{core.version}} made with
+ Statping {{core.version}} made with
diff --git a/frontend/src/pages/Settings.vue b/frontend/src/pages/Settings.vue
index 77494623..8bf097e3 100644
--- a/frontend/src/pages/Settings.vue
+++ b/frontend/src/pages/Settings.vue
@@ -68,7 +68,7 @@
{{$t('repo')}}
- Statping-ng v{{core.version}}
+ Statping-ng {{core.version}}
{{core.commit.slice(0,8)}}
diff --git a/go.mod b/go.mod
index 4e2a4e4d..1ce0e590 100644
--- a/go.mod
+++ b/go.mod
@@ -1,10 +1,9 @@
module github.com/statping-ng/statping-ng
-// +heroku goVersion go1.17
-go 1.17
+go 1.19
require (
- github.com/GeertJohan/go.rice v1.0.2
+ github.com/GeertJohan/go.rice v1.0.3
github.com/aws/aws-sdk-go v1.30.20
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/structs v1.1.0
@@ -23,9 +22,9 @@ require (
github.com/spf13/cobra v1.0.0
github.com/spf13/viper v1.6.3
github.com/statping-ng/emails v1.0.3
- github.com/stretchr/testify v1.6.1
+ github.com/stretchr/testify v1.8.1
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1
- golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
+ golang.org/x/crypto v0.4.0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
google.golang.org/grpc v1.28.1
gopkg.in/natefinch/lumberjack.v2 v2.0.0
@@ -51,12 +50,12 @@ require (
github.com/cenkalti/backoff/v4 v4.0.2 // indirect
github.com/cloudflare/cloudflare-go v0.11.6 // indirect
github.com/cpu/goacmedns v0.0.2 // indirect
- github.com/daaku/go.zipexe v1.0.0 // indirect
+ github.com/daaku/go.zipexe v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/dnsimple/dnsimple-go v0.60.0 // indirect
github.com/exoscale/egoscale v0.18.1 // indirect
- github.com/fsnotify/fsnotify v1.5.1 // indirect
+ github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-acme/lego/v3 v3.7.0 // indirect
github.com/go-errors/errors v1.0.2 // indirect
github.com/go-resty/resty/v2 v2.2.0 // indirect
@@ -64,6 +63,8 @@ require (
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.2 // indirect
+ github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c // indirect
+ github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
@@ -78,6 +79,7 @@ require (
github.com/json-iterator/go v1.1.9 // indirect
github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
+ github.com/kr/pretty v0.3.1 // indirect
github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect
github.com/labbsr0x/goh v1.0.1 // indirect
github.com/lextoumbourou/goodhosts v2.1.0+incompatible // indirect
@@ -110,23 +112,26 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
+ github.com/tdewolff/minify/v2 v2.12.4 // indirect
+ github.com/tdewolff/parse/v2 v2.6.4 // indirect
github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7 // indirect
github.com/transip/gotransip/v6 v6.0.2 // indirect
github.com/vultr/govultr v0.3.3 // indirect
go.opencensus.io v0.22.3 // indirect
go.uber.org/ratelimit v0.1.0 // indirect
- golang.org/x/net v0.2.0 // indirect
+ golang.org/x/net v0.4.0 // indirect
golang.org/x/sync v0.1.0 // indirect
- golang.org/x/sys v0.2.0 // indirect
- golang.org/x/text v0.4.0 // indirect
+ golang.org/x/sys v0.3.0 // indirect
+ golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
google.golang.org/api v0.21.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/ns1/ns1-go.v2 v2.3.0 // indirect
gopkg.in/square/go-jose.v2 v2.5.0 // indirect
- gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/go.sum b/go.sum
index dec75f9e..ec477814 100755
--- a/go.sum
+++ b/go.sum
@@ -75,8 +75,8 @@ github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1M
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0=
github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0=
-github.com/GeertJohan/go.rice v1.0.2 h1:PtRw+Tg3oa3HYwiDBZyvOJ8LdIyf6lAovJJtr7YOAYk=
-github.com/GeertJohan/go.rice v1.0.2/go.mod h1:af5vUNlDNkCjOZeSGFgIJxDje9qdjsO6hshx0gTmZt4=
+github.com/GeertJohan/go.rice v1.0.3 h1:k5viR+xGtIhF61125vCE1cmJ5957RQGXG6dmbaWZSmI=
+github.com/GeertJohan/go.rice v1.0.3/go.mod h1:XVdrU4pW00M4ikZed5q56tPf1v2KwnIKeIdc9CBYNt4=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -133,8 +133,9 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY=
github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E=
+github.com/daaku/go.zipexe v1.0.2 h1:Zg55YLYTr7M9wjKn8SY/WcpuuEi+kR2u4E8RhvpyXmk=
+github.com/daaku/go.zipexe v1.0.2/go.mod h1:5xWogtqlYnfBXkSB1o9xysukNP9GTvaNkqzUZbt3Bw8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -148,6 +149,7 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnsimple/dnsimple-go v0.60.0 h1:N+q+ML1CZGf+5r4udu9Opy7WJNtOaFT9aM86Af9gLhk=
@@ -176,8 +178,8 @@ github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9 h1:RPOsDNbnDUFaSt/
github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9/go.mod h1:OdiGKKgTAfMv7x9Hh9qYFueue77tr09LUAxwy2+M8wY=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
-github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
+github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
github.com/getsentry/sentry-go v0.5.1 h1:MIPe7ScHADsrK2vznqmhksIUFxq7m0JfTh+ZIMkI+VQ=
github.com/getsentry/sentry-go v0.5.1/go.mod h1:B8H7x8TYDPkeWPRzGpIiFO97LZP6rL8A3hEt8lUItMw=
@@ -248,6 +250,8 @@ github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomarkdown/markdown v0.0.0-20200820230800-3724143f5294/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
+github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c h1:iyaGYbCmcYK0Ja9a3OUa2Fo+EaN0cbLu0eKpBwPFzc8=
+github.com/gomarkdown/markdown v0.0.0-20221013030248-663e2500819c/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA=
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -256,8 +260,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -360,6 +365,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJ
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -426,7 +434,6 @@ github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ
github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E=
github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc=
@@ -460,6 +467,7 @@ github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAv
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -494,6 +502,8 @@ github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKc
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
@@ -542,21 +552,31 @@ github.com/statping/emails v1.0.0/go.mod h1:xFU85jXaiWQadqHqu/jDrGsAn6WPSk1WgKyT
github.com/statping/statping v0.90.64/go.mod h1:lbyNPB73IjWtnommV4wSejYfgUT1yLhhqelMjl1ZBb8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1 h1:HGVkRrwDCbmSP6h1CoBDj6l/mhnvsP5JbYaQ4ss0R6o=
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1/go.mod h1:I3xbaE9ud9/TEXzehwkHx86SyJwqeSNsX2X5oV61jIg=
github.com/tdewolff/minify/v2 v2.8.0/go.mod h1:6zN8VLhMfFxNrwHROcboYNo2+huPNu4SV8DPh3PUQ8E=
+github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE=
+github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk=
github.com/tdewolff/parse/v2 v2.4.4/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
+github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ=
+github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
+github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7 h1:CpHxIaZzVy26GqJn8ptRyto8fuoYOd1v0fXm9bG3wQ8=
github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7/go.mod h1:imsgLplxEC/etjIhdr3dNzV3JeT27LbVu5pYWm0JCBY=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
@@ -628,8 +648,9 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
+golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -699,8 +720,9 @@ golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
-golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
+golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -761,22 +783,22 @@ golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
-golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
+golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
+golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -827,7 +849,6 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
@@ -901,8 +922,9 @@ gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
@@ -936,8 +958,9 @@ gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/source/source.go b/source/source.go
index 544ed1a1..3d36f3d9 100644
--- a/source/source.go
+++ b/source/source.go
@@ -176,7 +176,7 @@ func DeleteAllAssets(folder string) error {
func CopyAllToPublic(box *rice.Box) error {
exclude := map[string]bool{
// "base.gohtml": true,
- "index.html": true,
+ "index.html": true,
}
return box.Walk("/", func(path string, info os.FileInfo, err error) error {
diff --git a/utils/utils_custom.go b/utils/utils_custom.go
index 08fd9781..cc5062b3 100644
--- a/utils/utils_custom.go
+++ b/utils/utils_custom.go
@@ -6,10 +6,6 @@ package utils
import (
"errors"
"os"
- "os/exec"
- "regexp"
- "strconv"
- "strings"
"syscall"
)
diff --git a/version.txt b/version.txt
deleted file mode 100644
index 8f63f4f9..00000000
--- a/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-0.91.0