Skip to content

Commit

Permalink
Added version 3.8
Browse files Browse the repository at this point in the history
Added a tonne of testing changes
  • Loading branch information
Sharpz7 authored Aug 21, 2022
2 parents 83a1e23 + e0ac8ab commit fd9d0ec
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=3.7
VERSION=3.8
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ tasks:
# Installation
On linux, just run:
```console
sudo curl -s -L https://github.com/SharpSet/sharpcd/releases/download/3.7/install.sh | sudo bash
sudo curl -s -L https://github.com/SharpSet/sharpcd/releases/download/3.8/install.sh | sudo bash
```

Or for just the client:
```console
sudo curl -s -L https://github.com/SharpSet/sharpcd/releases/download/3.7/install.sh | sudo bash -s client
sudo curl -s -L https://github.com/SharpSet/sharpcd/releases/download/3.8/install.sh | sudo bash -s client
```

## Command Options
Expand Down
9 changes: 0 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,22 @@ github.com/hashicorp/go-version v1.5.0 h1:O293SZ2Eg+AAYijkVK3jR786Am1bhDEh2GHT0t
github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
github.com/nsf/termbox-go v1.1.1 h1:nksUPLCb73Q++DwbYUBEglYBRPZyoXJdrj5L+TkjyZY=
github.com/nsf/termbox-go v1.1.1/go.mod h1:T0cTdVuOwf7pHQNtfhnEbzHbcNyCEcVU4YPpouCbVxo=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 h1:SLP7Q4Di66FONjDJbCYrCRrh97focO6sLogHO7/g8F0=
golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8=
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM=
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
4 changes: 2 additions & 2 deletions installs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if [[ $1 == "client" ]];
then
# Download and unpack
wget https://github.com/Sharpz7/sharpcd/releases/download/XXXXX/linux.tar.gz
wget https://github.com/SharpSet/sharpcd/releases/download/XXXXX/linux.tar.gz
sudo mkdir -p /tmp/sharpcd
sudo tar -C /tmp/sharpcd -zxvf linux.tar.gz
sudo cp /tmp/sharpcd/sharpcd /usr/local/bin/sharpcd
Expand Down Expand Up @@ -49,7 +49,7 @@ sudo rm /etc/systemd/system/sharpcd.service
sudo systemctl daemon-reload

# Download and unpack
wget https://github.com/Sharpz7/sharpcd/releases/download/XXXXX/linux.tar.gz
wget https://github.com/SharpSet/sharpcd/releases/download/XXXXX/linux.tar.gz
sudo mkdir -p /tmp/sharpcd
sudo tar -C /tmp/sharpcd -zxvf linux.tar.gz
sudo cp -n -R /tmp/sharpcd/* /usr/local/bin/
Expand Down
9 changes: 8 additions & 1 deletion sharpcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ tasks:
compose: /sharpcd/dev/testing/env.yml

external_task:
name: External Docker Parts
name: External Network and Named Volume
type: docker
sharpurl: https://localhost:5666
giturl: https://raw.githubusercontent.com/SharpSet/
compose: /sharpcd/dev/testing/external.yml

external2_task:
name: External Host Volume
type: docker
sharpurl: https://localhost:5666
giturl: https://raw.githubusercontent.com/SharpSet/
compose: /sharpcd/dev/testing/external2.yml

env_task2:
name: Enviroment Test Pass
type: docker
Expand Down
74 changes: 34 additions & 40 deletions sharpdev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,70 @@ envfile: .env
values:
SECRETD: '{\"secret\":\"$PASSD\"}'
SECRET: '{\"secret\":\"$PASS\"}'
sharpcd_internal: ./internal/sharpcd

scripts:
build: |
go build -o ./internal/sharpcd ./src
sharpcd: |
sharpdev build
./internal/sharpcd $_ARG1 $_ARG2 $_ARG3 $_ARG4 $_ARG5 $_ARG6 $_ARG7
sharedserver: |
sharpdev kill
sharpdev build
setup: |
go mod tidy
go build -o ./internal/sharpcd ./src
scripts:
server: |
sharpdev sharedserver
sudo ./internal/sharpcd server > /dev/null 2>&1 &
sharpdev kill
sudo sharpcd_internal server > /dev/null 2>&1 &
serveropen: |
sharpdev sharedserver
sudo ./internal/sharpcd server
sharpdev kill
sudo sharpcd_internal server
test: |
default: |
sharpdev server
sharpdev client_test_different_url_and_password
sharpdev client
sharpdev client_test_different_url
sharpdev client_test_password
sharpdev client_test_password_fail
sharpdev kill
kill: |
sudo apt-get install -y lsof
sudo lsof -ti :5666 | sudo xargs --no-run-if-empty kill -9
shared: |
sudo docker-compose -f "./internal/sharpcd-data/docker/external_task/docker-compose.yml" down
$(sudo docker volume rm memes) > /dev/null 2>&1 || true
$(sudo docker network rm memes) > /dev/null 2>&1 || true
sharpdev build
$(sudo docker volume rm externalv) > /dev/null 2>&1 || true
$(sudo docker network rm externalv) > /dev/null 2>&1 || true
client: |
sharpdev shared
./internal/sharpcd --secret $PASSD
sharpcd_internal --secret $PASSD
clientonly:
sharpcd_internal --secret $PASSD

client_test_different_url_and_password: |
sharpcd_internal --secret $PASSD --remotefile https://raw.githubusercontent.com/SharpSet/sharpcd/dev/testing/configs/different_url/sharpcd.yml
client_test_different_url: |
sharpdev shared
sharpdev sharpcd --secret $PASSD --remotefile https://raw.githubusercontent.com/Sharpz7/sharpcd/dev/testing/configs/different_url/sharpcd.yml
client_test_password_fail: |
sharpcd_internal --secret "Wrong" --remotefile https://raw.githubusercontent.com/SharpSet/sharpcd/dev/testing/configs/passwords/sharpcd.yml
client_test_password: |
sharpdev shared
sharpdev sharpcd --remotefile https://raw.githubusercontent.com/Sharpz7/sharpcd/dev/testing/configs/passwords/sharpcd.yml
trak2: |
sharpcd_internal --secret $PASSD trak $_ARG1 $_ARG2
trak: |
sharpdev build
./internal/sharpcd --secret $PASSD trak $_ARG1 $_ARG2 $_ARG3
trak3: |
sharpcd_internal --secret $PASSD trak $_ARG1 $_ARG2 $_ARG3
trakone: |
sharpdev trak job local $_ARG1
sharpdev trak3 job local $_ARG1
trakall: |
sharpdev trak alljobs local
sharpdev trak2 alljobs local
traklist: |
sharpdev trak list local
sharpdev trak2 list local
traklogs: |
sharpdev trak logs local $_ARG1
sharpdev trak3 logs local $_ARG1
filter: ./internal/sharpcd addfilter https://raw.githubusercontent.com/Sharpz7/
remove: ./internal/sharpcd removefilter https://raw.githubusercontent.com/Sharpz7/
token: ./internal/sharpcd changetoken $_ARG1
filter: sharpcd_internal addfilter https://raw.githubusercontent.com/SharpSet/
remove: sharpcd_internal removefilter https://raw.githubusercontent.com/SharpSet/
token: sharpcd_internal changetoken $_ARG1

alljobsd: curl -k -X POST -d SECRETD https://localhost:5666/api/jobs
alljobs: curl -k -X POST -d SECRET https://173.312.252.82:5666/api/jobs
Expand Down
2 changes: 1 addition & 1 deletion src/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/gorilla/websocket"
)

var sharpCDVersion = "3.7"
var sharpCDVersion = "3.8"

type statusCodes struct {
NotPostMethod int
Expand Down
2 changes: 1 addition & 1 deletion src/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ScriptVersion struct {
var scriptVersions = []ScriptVersion{
{
Version: 1.1,
WorksOn: "V3.7 and up",
WorksOn: "V3.8 and up",
},
{
Version: 1.0,
Expand Down
2 changes: 1 addition & 1 deletion testing/configs/different_url/sharpcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ tasks:
basic_task:
name: Basic
type: docker
giturl: https://raw.githubusercontent.com/Sharpz7/
giturl: https://raw.githubusercontent.com/SharpSet/
compose: /sharpcd/dev/testing/basic.yml
4 changes: 2 additions & 2 deletions testing/configs/passwords/sharpcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ tasks:
name: Basic
type: docker
sharpurl: https://localhost:5666
giturl: https://raw.githubusercontent.com/Sharpz7/
giturl: https://raw.githubusercontent.com/SharpSet/
compose: /sharpcd/dev/testing/basic.yml

env_task:
name: Enviroment Test Pass
type: docker
envfile: ./testing/.env
sharpurl: https://localhost:5666
giturl: https://raw.githubusercontent.com/Sharpz7/
giturl: https://raw.githubusercontent.com/SharpSet/
compose: /sharpcd/dev/testing/env.yml
4 changes: 2 additions & 2 deletions testing/external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ services:
command: tail -f /dev/null

volumes:
- "memes:/test"
- "externalv:/test"

networks:
default:
external:
name: external1

volumes:
external1:
externalv:
external: True
8 changes: 8 additions & 0 deletions testing/external2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3'
services:
hello_world:
image: ubuntu
command: tail -f /dev/null

volumes:
- "/tmp/doesnotexist:/test"

0 comments on commit fd9d0ec

Please sign in to comment.