Compare commits

..
Author SHA1 Message Date
wayfinderak dd2e479361 Resolve upstream Actions explicitly and check out the exact event revision
Build and Push Container / build-and-push (pull_request) Successful in 1m5s
2026-09-11 09:14:35 +00:00
wayfinderak 593d6c552e feat(delivery): publish immutable source images and declare release
Build and Push Container / build-and-push (pull_request) Failing after 3s
2026-09-11 08:53:23 +00:00
wayfinderak 198c3e7952 Cancel superseded pull request validation without cancelling releases 2026-09-11 08:47:06 +00:00
wayfinderak d1eb5f05af Run pull request validation once through native CI 2026-09-11 08:37:24 +00:00
wayfinderak 67cc71b05c Scope documentation CI and isolate delivery job resources 2026-09-11 08:10:34 +00:00
wayfinderak eeabf6308e Stop tracking Portainer secrets
Build and Push Container / build-and-push (push) Successful in 2m11s
2026-05-07 18:39:29 -08:00
wayfinderak db701b6c3e Tag latest image from master branch 2026-05-07 15:17:28 -08:00
wayfinderak 6fb3a2251d Add Portainer deployment files 2026-05-07 13:55:20 -08:00
wayfinderak 185ff03d37 Remove incomplete raffle service references 2026-05-04 15:48:18 -08:00
wayfinderak efd86465e5 Update .gitea/workflows/build-and-push.yml 2026-03-23 06:13:39 +00:00
wayfinderak a973babd3b Update .gitea/workflows/build-and-push.yml 2026-03-23 06:12:34 +00:00
wayfinderak 3e3d7de9f1 Migrate deployment to Gitea Actions and Portainer 2026-03-22 11:43:22 -08:00
Dustin Pianalto 1bb20a3c16 Add pgbouncer 2021-10-10 21:54:49 -08:00
Dustin Pianalto eb43a08b39 Update registry 2021-10-05 23:47:59 -08:00
Dustin Pianalto 5b95741deb Don't run migrations 2021-10-02 17:56:03 -08:00
Dustin Pianalto e67f8b3684 Merge branch 'development' 2021-10-02 17:17:28 -08:00
Dustin Pianalto a4e38eb3ae Update action 2021-10-02 16:59:49 -08:00
Dustin Pianalto f4e30a780f Update deployment and action 2021-10-02 16:58:26 -08:00
Dustin Pianalto ca8fc36e76 Update deployment and action 2021-10-02 16:42:40 -08:00
Dustin Pianalto 9a238bbbdc force bot to run on node with label 2021-07-19 13:06:16 -08:00
Dustin Pianalto 77785aa562 force bot to run on node with label 2021-07-19 12:49:57 -08:00
Dustin Pianalto b462b3a64b Test broadcast response 2021-06-30 22:00:38 -08:00
Dustin Pianalto 13da7a2b2d Test broadcast response 2021-06-30 21:54:35 -08:00
Dustin Pianalto 59576f3321 Test broadcast response 2021-06-30 21:46:31 -08:00
Dustin Pianalto c06d53532f Test broadcast response 2021-06-30 21:10:53 -08:00
Dustin Pianalto 12acd92a02 Test broadcast response 2021-06-30 21:00:43 -08:00
Dustin Pianalto b7446e0307 Test broadcast response 2021-06-30 20:56:51 -08:00
Dustin Pianalto 1f2ac29ca8 Test broadcast response 2021-06-30 14:51:04 -08:00
Dustin Pianalto 0f77d80408 Test broadcast response 2021-06-30 14:34:03 -08:00
Dustin Pianalto 626efeff74 Add broadcast command 2021-02-24 17:18:52 -09:00
Dustin Pianalto b963c070ea Add broadcast command 2021-02-24 17:09:35 -09:00
Dustin Pianalto 9ab0c0fe71 Add broadcast command 2021-02-24 16:29:42 -09:00
Dustin Pianalto 3e87a3df02 Compare servernames as lower 2021-02-24 14:29:32 -09:00
Dustin Pianalto 4852c42e8d Update format on listplayers output 2021-02-24 14:10:55 -09:00
Dustin Pianalto b29d7b4dab Add initial listplayers 2021-02-24 14:06:18 -09:00
Dustin Pianalto 5ffbd5fead Add initial listplayers 2021-02-24 14:01:20 -09:00
Dustin Pianalto 2f96c6f806 Add initial listplayers 2021-02-24 13:53:43 -09:00
Dustin Pianalto a011f3cd24 Fix permission bug in close 2021-02-24 11:37:52 -09:00
Dustin Pianalto 0041bd4c67 Add view command and update utils 2021-02-24 00:03:12 -09:00
Dustin Pianalto 7b1db25ccb Add view command and update utils 2021-02-23 23:53:28 -09:00
Dustin Pianalto 4e5a3ee1a8 Add view command and update utils 2021-02-23 23:42:02 -09:00
Dustin Pianalto 270319c615 Add view command and update utils 2021-02-23 23:29:19 -09:00
Dustin Pianalto d80fe268d7 Add comment command 2021-02-23 21:56:10 -09:00
Dustin Pianalto 01573b1dff Fix bug when updating request 2021-02-23 17:28:51 -09:00
Dustin Pianalto 530c5f489c Fix bug with query 2021-02-23 00:38:20 -09:00
Dustin Pianalto 70d5d4ef10 Move migrations to separate func 2021-02-22 23:59:13 -09:00
Dustin Pianalto 4f8dfd0499 Add ftp credentials to domain types 2021-02-22 23:24:19 -09:00
Dustin Pianalto 8c281fe9ce Add ftp credentials to db schema 2021-02-22 23:10:57 -09:00
Dustin Pianalto 642163896f Fix request message 2021-02-22 22:19:25 -09:00
Dustin Pianalto db403d5f01 Fix request message 2021-02-22 22:18:59 -09:00
Dustin Pianalto eb5b128cde Fix request message 2021-02-22 22:17:18 -09:00
Dustin Pianalto 5738d9e27f Fix bug getting messages from db 2021-02-22 22:12:07 -09:00
Dustin Pianalto d87c64df03 Add message to end of list with count 2021-02-22 22:03:06 -09:00
Dustin Pianalto 8edc6fd318 Update database schema to not allow null previous_content 2021-02-22 21:56:18 -09:00
Dustin Pianalto d50e415bf3 Update database schema to not allow null previous_content 2021-02-22 21:29:41 -09:00
Dustin Pianalto f46036c3c0 Update database schema to not allow null previous_content 2021-02-22 21:24:55 -09:00
Dustin Pianalto 2497b04be1 Update database schema to not allow null previous_content 2021-02-22 21:16:28 -09:00
Dustin Pianalto 1ade3850a4 Fix broken SQL query 2021-02-22 20:13:29 -09:00
Dustin Pianalto 485ee3f635 Add close and list commands 2021-02-22 19:59:39 -09:00
Dustin Pianalto b85bd69368 update actions 2021-02-22 19:51:04 -09:00
Dustin Pianalto 12901509a0 Add request close and list commands 2021-02-22 19:37:38 -09:00
Dustin Pianalto c0187d2671 Merge branch 'development' of github.com:dustinpianalto/Geeksbot into development 2021-02-22 14:05:09 -09:00
Dustin Pianalto bc03e1bd91 Move db and services to pkg 2021-02-22 14:04:51 -09:00
Dustin Pianalto cc298b4d86 start close command 2021-02-07 11:27:33 -09:00
Dustin Pianalto 3ccf7684f3 Add sar commands 2021-01-30 22:52:25 -09:00
Dustin Pianalto 827e9c7b65 Add sar commands 2021-01-30 22:42:14 -09:00
Dustin Pianalto f449101d49 Add sar commands 2021-01-30 22:31:22 -09:00
Dustin Pianalto f62de5ae83 Add sar commands 2021-01-30 22:17:01 -09:00
Dustin Pianalto e09824dbd3 remove mod/admin role command 2021-01-26 00:08:20 -09:00
Dustin Pianalto 25026d7010 remove mod/admin role command 2021-01-25 23:53:32 -09:00
Dustin Pianalto 776b3638d9 remove mod/admin role command 2021-01-25 23:49:58 -09:00
Dustin Pianalto 70baa24953 fix role commands 2021-01-25 23:09:21 -09:00
Dustin Pianalto b60135b6f8 fix role commands 2021-01-25 23:04:43 -09:00
Dustin Pianalto 3b338f0f53 fix role commands 2021-01-25 23:01:02 -09:00
Dustin Pianalto dc20dcf959 add admin role command 2021-01-25 22:41:51 -09:00
Dustin Pianalto c62f0f2f47 add moderator role command 2021-01-25 22:21:56 -09:00
Dustin Pianalto 21a7515797 add moderator role command 2021-01-25 21:52:12 -09:00
Dustin Pianalto cab3b15993 fix create request command 2021-01-25 02:31:36 -09:00
Dustin Pianalto 060b98f456 fix create request command 2021-01-25 02:27:56 -09:00
Dustin Pianalto c717d96c3d fix create request sql query 2021-01-25 02:20:11 -09:00
Dustin Pianalto f922a81fb1 fix create channel sql query 2021-01-25 02:11:28 -09:00
Dustin Pianalto 5d48fddaae fix create channel sql query 2021-01-25 02:05:13 -09:00
Dustin Pianalto dfe645d023 fix create channel sql query 2021-01-25 01:59:57 -09:00
Dustin Pianalto 19425cc03a fix get user sql query 2021-01-25 01:52:14 -09:00
Dustin Pianalto 2cb24b0d01 fix get user sql query 2021-01-25 01:43:31 -09:00
Dustin Pianalto 62bd23399c fix get user sql query 2021-01-25 01:38:22 -09:00
Dustin Pianalto 0e280ed843 add request command 2021-01-25 01:33:46 -09:00
Dustin Pianalto 588117e0d0 add request command 2021-01-25 01:21:49 -09:00
Dustin Pianalto 22fd99c673 add request command 2021-01-24 22:57:55 -09:00
Dustin Pianalto 715af8c1bc use custom prefixes 2021-01-24 01:11:22 -09:00
Dustin Pianalto ff5cfb5f3b remove duplicate prefixes 2021-01-24 01:05:16 -09:00
Dustin Pianalto ec1be803c8 debug removing prefix 2021-01-24 00:57:00 -09:00
Dustin Pianalto 3d835ab5f4 debug removing prefix 2021-01-24 00:53:04 -09:00
Dustin Pianalto 6e83bc6bd9 Fix array in guild service 2021-01-24 00:46:41 -09:00
Dustin Pianalto f60de139c0 Add prefix commands 2021-01-24 00:40:02 -09:00
Dustin Pianalto a8ee028292 Add prefix commands 2021-01-24 00:26:34 -09:00
Dustin Pianalto 081b21d58c Add prefix commands 2021-01-24 00:24:07 -09:00
Dustin Pianalto 454cced2a7 Fix nullability of columns 2021-01-23 20:10:48 -09:00
Dustin Pianalto 106333c26b use nullable string in user 2021-01-23 16:05:02 -09:00
Dustin Pianalto 6df9d6366f fix bug in user database 2021-01-23 15:10:04 -09:00
Dustin Pianalto 5940bc8e22 fix bug in user service 2021-01-23 15:03:15 -09:00
Dustin Pianalto c01562cec5 fix bug in user service 2021-01-23 14:59:35 -09:00
Dustin Pianalto 70c1d2d35b fix bug in user service 2021-01-23 14:48:59 -09:00
Dustin Pianalto 121a21e1c6 fix bug in user service 2021-01-23 14:46:25 -09:00
Dustin Pianalto f85c475cfd fix bug in running migrations 2021-01-23 04:27:34 -09:00
Dustin Pianalto a8ea92c140 change test command name 2021-01-23 04:20:17 -09:00
Dustin Pianalto 84311836f2 fix sql typo 2021-01-23 04:14:29 -09:00
Dustin Pianalto 28691e72fb rework services and add test command 2021-01-23 03:53:34 -09:00
Dustin Pianalto ccfecd0965 Initialize services 2021-01-23 03:11:12 -09:00
Dustin Pianalto e2f97afa6d initial database crud 2021-01-23 01:25:06 -09:00
Dustin Pianalto 4188343429 debug errors 2021-01-21 00:19:52 -09:00
Dustin Pianalto b8c9e8fd39 debug errors 2021-01-20 23:58:25 -09:00
Dustin Pianalto fec57e421f debug errors 2021-01-20 23:28:15 -09:00
Dustin Pianalto 6a4d326e57 debug errors 2021-01-20 23:22:23 -09:00
Dustin Pianalto 532be87f30 Fix syntax errors 2021-01-20 23:18:30 -09:00
Dustin Pianalto 7596d96a24 Test adding migration files to container 2021-01-20 23:04:17 -09:00
Dustin Pianalto ace7d8ac54 Test adding migration files to container 2021-01-20 23:04:14 -09:00
Dustin Pianalto be3fa68eca Test adding migration files to container 2021-01-20 22:44:17 -09:00
Dustin Pianalto 85e498d353 Test adding migration files to container 2021-01-20 22:40:15 -09:00
Dustin Pianalto e0491b63b3 Check error when running migrations 2021-01-20 22:37:04 -09:00
Dustin Pianalto f7f0f5fc8c Check error when running migrations 2021-01-20 22:21:01 -09:00
Dustin Pianalto 4ad96efc13 Fix typo in workflow 2021-01-20 22:13:59 -09:00
Dustin Pianalto 3a8dec15fa Fix typo in workflow 2021-01-20 22:11:22 -09:00
Dustin Pianalto 4cf439a826 Fix typo in workflow 2021-01-20 22:10:39 -09:00
Dustin Pianalto ba0b7235e2 Fix typo in workflow 2021-01-20 22:08:22 -09:00
Dustin Pianalto 248a566fea Fix typo in workflow 2021-01-20 21:59:24 -09:00
Dustin Pianalto 0cd69aa6b3 Fix typo in workflow 2021-01-20 21:53:56 -09:00
Dustin Pianalto 38d0f69f9f Fix typo in workflow 2021-01-20 21:50:13 -09:00
Dustin Pianalto 9c511db33e Fix typo in workflow 2021-01-20 21:40:29 -09:00
Dustin Pianalto 1306ba6fde Fix typo in workflow 2021-01-20 21:37:58 -09:00
Dustin Pianalto eedf34022e Fix typo in workflow 2021-01-20 21:36:43 -09:00
Dustin Pianalto fe4dca9307 Fix typo in workflow 2021-01-20 21:28:55 -09:00
Dustin Pianalto 1cc9437300 Fix typo in workflow 2021-01-20 21:10:06 -09:00
Dustin Pianalto f1df8472ef Connect to db in main 2021-01-20 21:07:23 -09:00
Dustin Pianalto df8f8f2fa6 Add basic database setup 2021-01-20 21:06:01 -09:00
Dustin Pianalto cfe683c53c Add domain types 2021-01-20 17:39:18 -09:00
Dustin Pianalto b611dd7c87 Change token env variable 2021-01-19 01:56:56 -09:00
Dustin Pianalto 426b4c99b7 change deployment name 2021-01-19 01:50:40 -09:00
Dustin Pianalto c77ae4cfac Add missing deps 2021-01-19 01:02:46 -09:00
Dustin Pianalto 30ea8d8c8d Add missing deps 2021-01-19 00:59:58 -09:00
Dustin Pianalto 4a88008b8d Remove missing deps 2021-01-19 00:56:21 -09:00
Dustin Pianalto 75697c44dc Basic bot and kubernetes deployment 2021-01-19 00:51:30 -09:00
Dustin Pianalto e840f6b651 Initial structure 2020-12-17 16:43:34 -09:00
Dusty.P df14091e04 Update and rename README.md to README 2020-12-15 23:00:56 -09:00
Dusty.P 9c18544dde Create LICENSE 2020-12-15 23:00:28 -09:00
32 changed files with 563 additions and 132 deletions
+5
View File
@@ -0,0 +1,5 @@
# Service release contract
Butler resolves this repository's protected source revision to verified immutable images. The platform updates only image references in the existing production Compose file and restarts only the already running application services. It preserves current environment, storage, routes, and provider configuration. It retains previous application images and restores them if readiness fails.
Migration and maintenance images are pinned when declared, but this release operation does not run database migrations or maintenance jobs. A release requiring a schema change needs the corresponding explicit platform migration first. No homelab image-pin commit is required for an ordinary compatible application release.
+12
View File
@@ -0,0 +1,12 @@
{
"version": 1,
"deployment": "geeksbot-release",
"environment": "production",
"images": {
"geeksbot_release_geeksbot_image": {
"name": "geeksbot",
"tag": "sha-{revision}"
}
},
"revision_variable": "geeksbot_release_revision"
}
+6
View File
@@ -0,0 +1,6 @@
.git
.github
.gitea
.env
.idea
geeksbot
+158
View File
@@ -0,0 +1,158 @@
name: Build and Push Container
on:
push:
branches:
- master
tags:
- v*
workflow_dispatch: null
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number
|| github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-push:
runs-on: butler-ci
env:
REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: gitea.wayfinderak.com/wayfinderak/geeksbot
container:
options: --dns 172.16.30.10
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Select relevant delivery work
id: delivery
env:
DELIVERY_EVENT: ${{ github.event_name }}
DELIVERY_REF: ${{ github.ref }}
DELIVERY_SHA: ${{ github.sha }}
DELIVERY_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
cd .
bash scripts/ci-select.sh
- name: Install Go and Docker CLI if needed
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash
run: |
set -euo pipefail
need_apt=0
need_apk=0
if ! command -v go >/dev/null 2>&1 || ! command -v docker >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
need_apt=1
elif command -v apk >/dev/null 2>&1; then
need_apk=1
else
echo "No supported package manager found" >&2
exit 1
fi
fi
if [ "$need_apt" -eq 1 ]; then
apt-get update
if ! command -v go >/dev/null 2>&1; then
apt-get install -y golang-go
fi
if ! command -v docker >/dev/null 2>&1; then
apt-get install -y docker.io curl dnsutils iputils-ping
fi
fi
if [ "$need_apk" -eq 1 ]; then
if ! command -v go >/dev/null 2>&1; then
apk add --no-cache go
fi
if ! command -v docker >/dev/null 2>&1; then
apk add --no-cache docker-cli curl bind-tools iputils
fi
fi
go version
docker version
- name: Run tests
if: ${{ steps.delivery.outputs.run == 'true' }}
run: go test ./...
- name: Log in to Gitea Container Registry
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash
run: |
set -euo pipefail
for attempt in 1 2 3; do
echo "docker login attempt $attempt"
if echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "$REGISTRY" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin; then
exit 0
fi
sleep 5
done
echo "docker login failed after 3 attempts" >&2
exit 1
- name: Determine image tags
if: ${{ steps.delivery.outputs.run == 'true' }}
id: meta
shell: bash
env:
REF: ${{ gitea.ref }}
REF_NAME: ${{ gitea.ref_name }}
SHA: ${{ gitea.sha }}
run: |
set -euo pipefail
tags=("$IMAGE_NAME:sha-$SHA")
if [[ "$REF" == refs/tags/* ]]; then
version="$REF_NAME"
tags+=("$IMAGE_NAME:$version")
tags+=("$IMAGE_NAME:latest")
else
branch="$REF_NAME"
branch_safe="$(echo "$branch" | tr '/_' '--')"
sha_short="$(echo "$SHA" | cut -c1-7)"
tags+=("$IMAGE_NAME:$branch_safe")
tags+=("$IMAGE_NAME:$branch_safe-$sha_short")
if [[ "$branch" == "main" || "$branch" == "master" ]]; then
tags+=("$IMAGE_NAME:latest")
fi
fi
printf 'tags<<EOF\n' >> "$GITHUB_OUTPUT"
printf '%s\n' "${tags[@]}" >> "$GITHUB_OUTPUT"
printf 'EOF\n' >> "$GITHUB_OUTPUT"
- name: Build image
if: ${{ steps.delivery.outputs.run == 'true' }}
shell: bash
run: |
set -euo pipefail
mapfile -t tags <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
build_args=()
for tag in "${tags[@]}"; do
build_args+=(--tag "$tag")
done
docker build --label "org.opencontainers.image.revision=$GITHUB_SHA" "${build_args[@]}" .
- name: Push image
if: ${{ (steps.delivery.outputs.run == 'true') && github.event_name != 'pull_request' }}
shell: bash
run: |
set -euo pipefail
while IFS= read -r tag; do
[ -n "$tag" ] || continue
docker push "$tag"
done <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
+48 -44
View File
@@ -1,60 +1,64 @@
name: CI
name: Build and Push Container
# Controls when the action will run. Triggers the workflow on push to master or development
# with a tag like v1.0.0 or v1.0.0-dev
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z]+
branches:
- master
- main
tags:
- v*
workflow_dispatch:
env:
REGISTRY: gitea.wayfinderak.com
IMAGE_NAME: wayfinderak/geeksbot
jobs:
build:
docker:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Get Version
id: get_version
uses: battila7/get-version-action@v2.0.0
- name: Checkout
uses: actions/checkout@v4
- name: Install go-bindata and build migrations
env:
GOPATH: /home/runner/work/Geeksbot/
run: |
go get -u github.com/go-bindata/go-bindata/...
/home/runner/work/Geeksbot/bin/go-bindata -pkg migrations -prefix $GITHUB_WORKSPACE/pkg/database/migrations/ -o $GITHUB_WORKSPACE/pkg/database/migrations/bindata.go $GITHUB_WORKSPACE/pkg/database/migrations/
head $GITHUB_WORKSPACE/pkg/database/migrations/bindata.go
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build container image
env:
IMAGE_TAG: ${{ steps.get_version.outputs.version-without-v }}
run: docker build -t registry.digitalocean.com/djpianalto/geeksbot:$IMAGE_TAG .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Login to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 600
- name: Prepare image tags
id: prep
shell: bash
run: |
short_sha="${GITHUB_SHA::7}"
tags="${REGISTRY}/${IMAGE_NAME}:sha-${short_sha}"
- name: Push image to DigitalOcean Container Registry
run: docker push registry.digitalocean.com/djpianalto/geeksbot:$IMAGE_TAG
env:
IMAGE_TAG: ${{ steps.get_version.outputs.version-without-v }}
if [[ "${GITHUB_REF_TYPE}" == "branch" && ("${GITHUB_REF_NAME}" == "master" || "${GITHUB_REF_NAME}" == "main") ]]; then
tags+=$'\n'"${REGISTRY}/${IMAGE_NAME}:latest"
fi
- name: Update deployment file
run: TAG=${{ steps.get_version.outputs.version-without-v }} && sed -i 's|<IMAGE>|registry.digitalocean.com/djpianalto/geeksbot:'${TAG}'|' $GITHUB_WORKSPACE/deployment.yml
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
version="${GITHUB_REF_NAME#v}"
tags+=$'\n'"${REGISTRY}/${IMAGE_NAME}:${version}"
fi
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 discord-bots
{
echo 'tags<<EOF'
echo "$tags"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Deploy to DigitalOcean Kubernetes
run: kubectl apply -f $GITHUB_WORKSPACE/deployment.yml
- name: Verify deployment
run: kubectl rollout status deployment/geeksbot
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.prep.outputs.tags }}
+2
View File
@@ -1,2 +1,4 @@
.env
.idea
portainer-app.env
+10 -14
View File
@@ -1,22 +1,18 @@
FROM golang:1.14-alpine as dev
FROM golang:1.22-alpine AS builder
WORKDIR /go/src/Geeksbot
COPY ./go.mod .
COPY ./go.sum .
WORKDIR /src
RUN apk add --no-cache ca-certificates git tzdata
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go install github.com/dustinpianalto/geeksbot/...
RUN go get -u github.com/go-bindata/go-bindata/...
ARG TARGETARCH=amd64
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o /out/geeksbot ./cmd/geeksbot
CMD [ "go", "run", "cmd/geeksbot/main.go"]
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata
from alpine
COPY --from=builder /out/geeksbot /usr/local/bin/geeksbot
WORKDIR /bin
COPY --from=dev /go/bin/geeksbot ./geeksbot
COPY --from=dev /go/bin/go-bindata ./go-bindata
CMD [ "geeksbot" ]
ENTRYPOINT ["/usr/local/bin/geeksbot"]
+26
View File
@@ -0,0 +1,26 @@
# Portainer deployment notes
Generated from the current Kubernetes deployment in namespace `discord-bots`. Secret values are in the local `portainer-*.env` files.
## Kubernetes source
- Deployment: `geeksbot`
- Replicas: `1`
- Rolling update: maxSurge `1`, maxUnavailable `1`
- minReadySeconds: `120`
- Labels/selectors: `app=geeksbot`
- Image pull secrets: `none required for Portainer stack`
## Containers
- `pgbouncer`: image `timoha/pgbouncer:1.15.0`; env: DATABASE_URL, SERVER_TLS_SSLMODE, AUTH_TYPE; ports: 5432; requests: {'cpu': '500m', 'memory': '256Mi'}; limits: {'cpu': '1', 'memory': '512Mi'}
- `geeksbot`: image `gitea.wayfinderak.com/wayfinderak/geeksbot:latest`; env: DATABASE_URL, DISCORD_TOKEN; ports: none; requests: {'cpu': '1', 'memory': '512Mi'}; limits: {'cpu': '2', 'memory': '1Gi'}
## Portainer files
- `portainer-stack.yml` - Docker Compose stack to paste/use in Portainer.
- `portainer-app.env` - bot runtime secrets/env.
## Portainer database connection
This Portainer stack does not include pgbouncer. `DATABASE_URL` in `portainer-app.env` points directly at the external PostgreSQL service copied from the Kubernetes pgbouncer upstream URL.
+7 -5
View File
@@ -6,11 +6,11 @@ import (
"os/signal"
"syscall"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/discordgo"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot/internal/exts"
"github.com/dustinpianalto/geeksbot/pkg/database"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
func main() {
@@ -22,13 +22,15 @@ func main() {
}
dg.State.MaxMessageCount = 100
dg.StateEnabled = true
dg.LogLevel = 3
dg.Debug = false
dg.Identify = discordgo.Identify{
Intents: discordgo.MakeIntent(discordgo.IntentsAll),
}
database.ConnectDatabase(os.Getenv("DATABASE_URL"))
database.RunMigrations()
//database.RunMigrations()
services.InitializeServices()
owners := []string{
+37 -1
View File
@@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: geeksbot
namespace: default
namespace: discord-bots
labels:
app: geeksbot
spec:
@@ -21,8 +21,42 @@ spec:
app: geeksbot
spec:
containers:
- name: pgbouncer
image: timoha/pgbouncer:1.15.0
resources:
requests:
memory: "256Mi"
cpu: "0.5"
limits:
memory: "512Mi"
cpu: "1"
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_url
- name: SERVER_TLS_SSLMODE
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_ssl
- name: AUTH_TYPE
valueFrom:
secretKeyRef:
name: geeksbot
key: pgbouncer_auth
ports:
- containerPort: 5432
- name: geeksbot
image: <IMAGE>
resources:
requests:
memory: "512Mi"
cpu: "1"
limits:
memory: "1Gi"
cpu: "2"
env:
- name: DATABASE_URL
valueFrom:
@@ -34,3 +68,5 @@ spec:
secretKeyRef:
name: geeksbot
key: discord_token
imagePullSecrets:
- name: registry-1
+8
View File
@@ -0,0 +1,8 @@
services:
geeksbot:
image: ${IMAGE:-gitea.wayfinderak.com/wayfinderak/geeksbot:${IMAGE_TAG:-latest}}
container_name: geeksbot
restart: unless-stopped
environment:
DATABASE_URL: ${DATABASE_URL}
DISCORD_TOKEN: ${DISCORD_TOKEN}
+5 -5
View File
@@ -1,13 +1,13 @@
module github.com/dustinpianalto/geeksbot
module gitea.wayfinderak.com/wayfinderak/geeksbot
go 1.14
require (
github.com/bwmarrin/discordgo v0.22.1
github.com/dustinpianalto/disgoman v0.0.15
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/golang-migrate/migrate v3.5.4+incompatible // indirect
github.com/bwmarrin/discordgo v0.29.0 // indirect
github.com/dustinpianalto/discordgo v0.0.4
github.com/dustinpianalto/disgoman v0.0.26
github.com/golang-migrate/migrate/v4 v4.14.1
github.com/gorcon/rcon v1.3.1
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/lib/pq v1.8.0
)
+50 -17
View File
@@ -33,19 +33,22 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/AlekSi/pointer v1.0.0 h1:KWCWzsvFxNLcmM5XmiqHsGTTsuwZMsLFwWF9Y+//bNE=
github.com/AlekSi/pointer v1.0.0/go.mod h1:1kjywbfcPFCmncIxtk6fIEub6LKrfMz3gc5QKVOSOA8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ClickHouse/clickhouse-go v1.3.12/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA=
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0=
github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/bwmarrin/discordgo v0.20.2/go.mod h1:O9S4p+ofTFwB02em7jkpkV8M3R0/PUVOwN61zSZ0r4Q=
github.com/bwmarrin/discordgo v0.22.1 h1:254fNYyfqJWKbPzO5g8j/nUvRgj4dNlI19EB8rnkpt8=
github.com/bwmarrin/discordgo v0.22.1/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M=
github.com/bwmarrin/discordgo v0.29.0 h1:FmWeXFaKUwrcL3Cx65c20bTRW+vOb6k8AnaP+EgjDno=
github.com/bwmarrin/discordgo v0.29.0/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY=
github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -57,22 +60,31 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY=
github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
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=
github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dhui/dktest v0.3.3 h1:DBuH/9GFaWbDRa42qsut/hbQu+srAQ0rPWnUoiGX7CA=
github.com/dhui/dktest v0.3.3/go.mod h1:EML9sP4sqJELHn4jV7B0TY8oF6077nk83/tz7M56jcQ=
github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible h1:iWPIG7pWIsCwT6ZtHnTUpoVMnete7O/pzd9HFE3+tn8=
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dustinpianalto/disgoman v0.0.15 h1:kdIw6jhC82WBut7+4BarqxBw06dozU+Hu47LQzkkoGM=
github.com/dustinpianalto/disgoman v0.0.15/go.mod h1:v3FM6n+4dH9XlvO+IDx6MN3DUnGq6YVDBvy1A1k202g=
github.com/dustinpianalto/discordgo v0.0.4 h1:KlIkMzDH4jKRbs5IxeqeIXtNTDVcDi/sHV1gaKYEnPg=
github.com/dustinpianalto/discordgo v0.0.4/go.mod h1:LKY7UDCPJMChgrowLagHjDSj1gWbt3Hx+6bRFjpaVg8=
github.com/dustinpianalto/disgoman v0.0.26 h1:7p6hDbNgEehUgOHigY/lHDY4P2VklJiZmOn674ka1h0=
github.com/dustinpianalto/disgoman v0.0.26/go.mod h1:WsDb+7XIm2MJ6xhxRAiXlzSPuSYIGSr4rWRmACeoing=
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -80,9 +92,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw=
github.com/go-bindata/go-bindata v1.0.0 h1:DZ34txDXWn1DyWa+vQf7V9ANc2ILTtrEjtlsdJRF26M=
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -91,10 +100,8 @@ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang-migrate/migrate v1.3.2 h1:QAlFV1QF9zdkzy/jujlBVkVu+L/+k18cg8tuY1/4JDY=
github.com/golang-migrate/migrate v3.5.4+incompatible h1:R7OzwvCJTCgwapPCiX6DyBiu2czIUMDCB118gFTKTUA=
github.com/golang-migrate/migrate v3.5.4+incompatible/go.mod h1:IsVUlFN5puWOmXrqjgGUfIRIbU7mr8oNBE2tyERd9Wk=
github.com/golang-migrate/migrate/v4 v4.14.1 h1:qmRd/rNGjM1r3Ve5gHd5ZplytrD02UcItYNxJ3iUHHE=
github.com/golang-migrate/migrate/v4 v4.14.1/go.mod h1:l7Ks0Au6fYHuUIxUhQ0rcVX1uLlJg54C/VvW7tvxSz0=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
@@ -123,6 +130,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -135,6 +143,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/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-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
@@ -152,15 +161,17 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gorcon/rcon v1.3.1 h1:z6a5iOlojfdkvA1qaKEng7QfCJuCzYlC9BUDs6/M+74=
github.com/gorcon/rcon v1.3.1/go.mod h1:2gztBPSV2WxkPkqV4jiJkdHs+NT46mNSGb8JxbPesx4=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -207,9 +218,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -226,6 +239,7 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY=
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
@@ -234,12 +248,16 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
@@ -252,6 +270,7 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/snowflakedb/glog v0.0.0-20180824191149-f5055e6f21ce/go.mod h1:EB/w24pR5VKI60ecFnKqXzxX3dOorz1rnVicQTQrGM0=
github.com/snowflakedb/gosnowflake v1.3.5/go.mod h1:13Ky+lxzIm3VqNDZJdyvu9MCGy+WgRdYFdXp96UcLZU=
@@ -262,6 +281,7 @@ github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
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 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs=
@@ -283,8 +303,6 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 h1:y6ce7gCWtnH+m3dCjzQ1PCuwl28DDIc3VNnvY29DlIA=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
@@ -294,8 +312,9 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b h1:7mWr3k41Qtv8XlltBkDkl8LoP3mpSgBW8BUoxtEdbXg=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
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=
@@ -359,6 +378,8 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -412,14 +433,19 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
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 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
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-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -472,6 +498,7 @@ golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8T
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.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
@@ -528,6 +555,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3 h1:sg8vLDNIxFPHTchfhH1E3AI32BL3f23oie38xUWnJM8=
google.golang.org/genproto v0.0.0-20201030142918-24207fddd1c3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -542,6 +570,7 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@@ -552,8 +581,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
@@ -563,7 +594,9 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
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=
+2 -2
View File
@@ -2,8 +2,8 @@ package discord_utils
import (
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
func IsGuildMod(ctx disgoman.Context, user geeksbot.User) bool {
+84 -3
View File
@@ -2,12 +2,13 @@ package arcon
import (
"fmt"
"log"
"strings"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
"github.com/gorcon/rcon"
)
@@ -101,3 +102,83 @@ func listplayers(ctx disgoman.Context, server geeksbot.Server) {
fmt.Sprintf("**%s:**%s", server.Name, strings.Join(players, "\n")),
)
}
var BroadcastCommand = &disgoman.Command{
Name: "broadcast",
Aliases: nil,
Description: "Broadcast a message to ARK servers.",
OwnerOnly: false,
Hidden: false,
RequiredPermissions: 0,
Invoke: broadcastCommandFunc,
}
func broadcastCommandFunc(ctx disgoman.Context, args []string) {
guild, err := services.GuildService.GetOrCreateGuild(ctx.Guild.ID)
if err != nil {
discord_utils.SendErrorMessage(ctx, "Error getting Guild from the database", err)
return
}
author, err := services.UserService.GetOrCreateUser(ctx.Message.Author.ID)
if err != nil {
discord_utils.SendErrorMessage(ctx, "Sorry, there was a problem getting your user.", err)
return
}
if !discord_utils.IsGuildAdmin(ctx, author) && !discord_utils.IsGuildMod(ctx, author) {
return
}
message := strings.Join(args[1:len(args)], " ")
if strings.ToLower(args[0]) == "all" {
servers, err := services.ServerService.GuildServers(guild)
if err != nil {
discord_utils.SendErrorMessage(ctx, "Could not find any servers for this guild", err)
return
}
for _, server := range servers {
go broadcast(ctx, server, message)
}
return
} else {
serverName := strings.Title(strings.ReplaceAll(args[0], "_", " "))
server, err := services.ServerService.ServerByName(serverName, guild)
if err != nil {
discord_utils.SendErrorMessage(ctx, fmt.Sprintf("Could not find %s", serverName), err)
return
}
broadcast(ctx, server, message)
}
}
func broadcast(ctx disgoman.Context, server geeksbot.Server, message string) {
msg, err := ctx.Send(fmt.Sprintf("**Broadcasting to: %s**", server.Name))
if err != nil {
discord_utils.SendErrorMessage(ctx, "There was an error getting the player list", err)
return
}
conn, err := rcon.Dial(fmt.Sprintf("%s:%d", server.IPAddr, server.Port), server.Password)
if err != nil {
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**Could not open connection to %s**", server.Name),
)
return
}
defer conn.Close()
userName := discord_utils.GetDisplayName(ctx, ctx.Message.Author.ID)
response, err := conn.Execute(fmt.Sprintf("broadcast %s: %s", userName, message))
if err != nil {
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**There was a problem getting a response from %s**", server.Name),
)
return
}
log.Printf("%T - %#v", response, response)
if strings.Contains(response, "Server received, But no response!!") {
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**%s Broadcast Successful**", server.Name),
)
return
}
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**Broadcasting to %s Failed!**", server.Name),
)
}
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"fmt"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
var AddPrefixCommand = &disgoman.Command{
+5 -5
View File
@@ -5,12 +5,12 @@ import (
"strconv"
"strings"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/discordgo"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
var AddModeratorRoleCommand = &disgoman.Command{
+5 -4
View File
@@ -2,10 +2,10 @@ package exts
import (
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot/internal/exts/arcon"
"github.com/dustinpianalto/geeksbot/internal/exts/guild"
"github.com/dustinpianalto/geeksbot/internal/exts/requests"
"github.com/dustinpianalto/geeksbot/internal/exts/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/arcon"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/guild"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/requests"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/exts/utils"
)
func AddCommandHandlers(g *disgoman.CommandManager) {
@@ -38,4 +38,5 @@ func AddCommandHandlers(g *disgoman.CommandManager) {
_ = g.AddCommand(requests.ViewCommand)
_ = g.AddCommand(requests.CommentCommand)
_ = g.AddCommand(arcon.ListplayersCommand)
_ = g.AddCommand(arcon.BroadcastCommand)
}
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"time"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/internal/utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
var RequestCommand = &disgoman.Command{
+7 -8
View File
@@ -7,11 +7,11 @@ import (
"strings"
"time"
"github.com/bwmarrin/discordgo"
"github.com/dustinpianalto/discordgo"
"github.com/dustinpianalto/disgoman"
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/internal/discord_utils"
"github.com/dustinpianalto/geeksbot/pkg/services"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/internal/discord_utils"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/services"
)
var PingCommand = &disgoman.Command{
@@ -110,9 +110,9 @@ var GitCommand = &disgoman.Command{
func gitCommandFunc(ctx disgoman.Context, _ []string) {
embed := &discordgo.MessageEmbed{
Title: "Hi there, My code is on Github",
Title: "Hi there, my code is on Gitea",
Color: 0,
URL: "https://github.com/dustinpianalto/Geeksbot",
URL: "https://gitea.wayfinderak.com/wayfinderak/geeksbot",
}
_, err := ctx.Session.ChannelMessageSendEmbed(ctx.Channel.ID, embed)
if err != nil {
@@ -213,10 +213,9 @@ func userCommandFunc(ctx disgoman.Context, args []string) {
Inline: false,
}
guildJoinTime, _ := member.JoinedAt.Parse()
guildJoinedField := &discordgo.MessageEmbedField{
Name: "Joined Guild:",
Value: discord_utils.ParseDateString(guildJoinTime),
Value: discord_utils.ParseDateString(member.JoinedAt),
Inline: false,
}
+4 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
)
type channelService struct {
@@ -50,6 +50,9 @@ func (s channelService) GuildChannels(g geeksbot.Guild) ([]geeksbot.Channel, err
var channels []geeksbot.Channel
queryString := "SELECT id FROM channels WHERE guild_id = $1"
rows, err := s.db.Query(queryString, g.ID)
if err != nil {
return channels, err
}
for rows.Next() {
var id string
err = rows.Scan(&id)
+13 -5
View File
@@ -4,8 +4,9 @@ import (
"database/sql"
"fmt"
"log"
"time"
"github.com/dustinpianalto/geeksbot/pkg/database/migrations"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database/migrations"
"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database/postgres"
bindata "github.com/golang-migrate/migrate/v4/source/go_bindata"
@@ -26,12 +27,19 @@ func ConnectDatabase(dbConnString string) {
var err error
db, err = sql.Open("postgres", dbConnString)
if err != nil {
log.Fatal(fmt.Errorf("Can't connect to the database: %w", err))
log.Fatal(fmt.Errorf("can't connect to the database: %w", err))
}
db.SetMaxOpenConns(5)
db.SetMaxIdleConns(2)
db.SetConnMaxLifetime(30 * time.Minute)
db.SetConnMaxIdleTime(5 * time.Minute)
if err = db.Ping(); err != nil {
log.Fatal(fmt.Errorf("can't ping the database: %w", err))
}
log.Println("Database Connected.")
db.SetMaxOpenConns(75)
db.SetMaxIdleConns(5)
db.SetConnMaxLifetime(300)
initServices()
log.Println("Services Initialized")
}
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/lib/pq"
)
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"github.com/lib/pq"
)
@@ -61,7 +61,7 @@ func (s messageService) UpdateMessage(m geeksbot.Message) (geeksbot.Message, err
queryString = "UPDATE messages SET modified_at = $2, content = $3, previous_content = $4 WHERE id = $1"
_, err = s.db.Exec(queryString, m.ID, m.ModifiedAt, m.Content, previousContent)
m.PreviousContent = previousContent
return m, nil
return m, err
}
func (s messageService) DeleteMessage(m geeksbot.Message) error {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
)
type patreonService struct {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
)
type requestService struct {
+2 -2
View File
@@ -4,7 +4,7 @@ import (
"database/sql"
"log"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
)
type serverService struct {
@@ -74,7 +74,7 @@ func (s serverService) ServerByID(id int) (geeksbot.Server, error) {
func (s serverService) ServerByName(name string, guild geeksbot.Guild) (geeksbot.Server, error) {
var id int
queryString := "SELECT id FROM servers WHERE name = $1 AND guild_id = $2"
queryString := "SELECT id FROM servers WHERE LOWER(name) = LOWER($1) AND guild_id = $2"
row := s.db.QueryRow(queryString, name, guild.ID)
err := row.Scan(&id)
if err != nil {
+1 -1
View File
@@ -3,7 +3,7 @@ package database
import (
"database/sql"
"github.com/dustinpianalto/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
)
type userService struct {
+2 -2
View File
@@ -1,8 +1,8 @@
package services
import (
"github.com/dustinpianalto/geeksbot"
"github.com/dustinpianalto/geeksbot/pkg/database"
"gitea.wayfinderak.com/wayfinderak/geeksbot"
"gitea.wayfinderak.com/wayfinderak/geeksbot/pkg/database"
)
var (
+3
View File
@@ -0,0 +1,3 @@
DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/geeksbot?sslmode=disable
DISCORD_TOKEN=replace-me
STEAM_API_KEY=replace-me
+9
View File
@@ -0,0 +1,9 @@
services:
geeksbot:
image: gitea.wayfinderak.com/wayfinderak/geeksbot:latest
container_name: geeksbot
restart: unless-stopped
env_file:
- ./portainer-app.env
mem_limit: 1g
cpus: "2.0"
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Keep required jobs alive; only skip reviewed non-runtime documentation paths.
set -euo pipefail
base="${DELIVERY_BASE:-}"
head="$(git rev-parse HEAD)"
run=true
if [[ "${DELIVERY_REF:-}" != refs/tags/* && "$head" == "${DELIVERY_SHA:-}" && "${DELIVERY_EVENT:-}" =~ ^(push|pull_request)$ && "$base" =~ ^[0-9a-f]{40}$ && "$base" != 0000000000000000000000000000000000000000 ]]; then
if ! git cat-file -e "$base^{commit}" 2>/dev/null; then
if [[ -n "${DELIVERY_FETCH_TOKEN:-}" ]]; then
git -c "http.extraHeader=Authorization: token ${DELIVERY_FETCH_TOKEN}" fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
else
git fetch --quiet --depth=1 origin "$base" >/dev/null 2>&1 || true
fi
fi
if git cat-file -e "$base^{commit}" 2>/dev/null; then
paths="$(mktemp)"
trap 'rm -f -- "$paths"' EXIT
# Snapshot comparison is conservative when main advanced during a PR.
# Both rename sides remain visible, including names containing newlines.
if git diff --no-renames --name-only -z "$base" "$head" > "$paths"; then
run=false
while IFS= read -r -d '' path; do
case "$path" in
README.md|CHANGELOG.md|LICENSE|LICENSE.md) ;;
*) run=true; break ;;
esac
done < "$paths"
fi
fi
fi
if [[ "$run" == false ]]; then
echo 'Only reviewed non-runtime documentation changed; build and validation are not applicable.'
else
echo 'Runtime, unknown inputs, or unavailable event history: run required validation.'
fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "run=$run" >> "$GITHUB_OUTPUT"
fi
printf '%s\n' "$run"