Added ubuntu SDK wrapper

This commit is contained in:
frikky
2022-04-18 21:43:56 +02:00
parent a42e815fd4
commit 24c25a9aa9
17 changed files with 228 additions and 396 deletions
+19
View File
@@ -0,0 +1,19 @@
FROM ubuntu as base
FROM base as builder
RUN apt-get update
RUN apt-get dist-upgrade -y
RUN apt install build-essential libffi-dev musl-dev openssl python3 python3-pip -y
RUN mkdir /install
WORKDIR /install
COPY requirements.txt /requirements.txt
RUN pip install --prefix="/install" -r /requirements.txt
FROM base
COPY --from=builder /install /usr/local
COPY __init__.py /app/walkoff_app_sdk/__init__.py
COPY app_base.py /app/walkoff_app_sdk/app_base.py
+1 -1
View File
@@ -2494,7 +2494,7 @@ class AppBase:
# FIXME: Check if the previous node has a result or not
self.logger.info("[DEBUG] Relevant conditions: %s" % branch["conditions"])
#self.logger.info("[DEBUG] Relevant conditions: %s" % branch["conditions"])
successful_conditions = []
failed_conditions = []
successful_conditions = 0
+11 -2
View File
@@ -1,9 +1,8 @@
#!/bin/bash
### DEFAULT
NAME=shuffle-app_sdk
VERSION=0.9.67
VERSION=0.9.69
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
@@ -16,6 +15,16 @@ docker push ghcr.io/frikky/$NAME:latest
#### UBUNTU
NAME=shuffle-app_sdk_ubuntu
docker build . -f Dockerfile_ubuntu -t frikky/shuffle:app_sdk_ubuntu -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
docker push frikky/shuffle:app_sdk_ubuntu
docker push ghcr.io/frikky/$NAME:$VERSION
#### KALI ###
#NAME=shuffle-app_sdk_kali
#docker build . -f Dockerfile_kali -t frikky/shuffle:app_sdk_kali -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION
+1 -1
View File
@@ -261,7 +261,7 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin
//log.Printf("RESPONSE: %#v", imageBuildResponse)
//log.Printf("Response: %#v", imageBuildResponse.Body)
log.Printf("[DEBUG] IMAGERESPONSE: %#v", imageBuildResponse.Body)
//log.Printf("[DEBUG] IMAGERESPONSE: %#v", imageBuildResponse.Body)
if imageBuildResponse.Body != nil {
defer imageBuildResponse.Body.Close()
+2 -2
View File
@@ -2,7 +2,7 @@ module main
go 1.16
//replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
replace github.com/shuffle/shuffle-shared => ../../../shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
//replace github.com/frikky/go-elasticsearch => ../../../../git/go-elasticsearch
@@ -24,7 +24,7 @@ require (
github.com/h2non/filetype v1.1.3
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
github.com/satori/go.uuid v1.2.0
github.com/shuffle/shuffle-shared v0.2.28
github.com/shuffle/shuffle-shared v0.2.29
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/api v0.65.0
+7 -2
View File
@@ -1029,6 +1029,10 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
}
}
if os.Getenv("SHUFFLE_CHAT_DISABLED") == "true" {
chatDisabled = true
}
tutorialsFinished := []string{}
returnValue := shuffle.HandleInfo{
Success: true,
@@ -1044,8 +1048,9 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
Expiration: expiration.Unix(),
},
},
EthInfo: userInfo.EthInfo,
Tutorials: tutorialsFinished,
EthInfo: userInfo.EthInfo,
Tutorials: tutorialsFinished,
ChatDisabled: chatDisabled,
}
returnData, err := json.Marshal(returnValue)
+1
View File
@@ -150,6 +150,7 @@ func handleGetWorkflowqueueConfirm(resp http.ResponseWriter, request *http.Reque
}
// FIXME: Add authentication?
// Cloud has auth.
id := request.Header.Get("Org-Id")
if len(id) == 0 {
log.Printf("[ERROR] No Org-Id header set - confirm")