Built PoC of execution in workflow view (#23)

This commit is contained in:
frikky
2020-05-24 20:58:05 +02:00
parent 34d0416c2b
commit 7a4e9560a2
10 changed files with 158 additions and 50 deletions
+8 -3
View File
@@ -1,4 +1,9 @@
docker rmi frikky/shuffle:orborus --force
NAME=orborus
VERSION=0.1.0
docker build . -t frikky/shuffle:orborus
docker push frikky/shuffle:orborus
echo "Running docker build with $NAME:$VERSION"
#docker rmi frikky/shuffle:$NAME --force
docker build . -t frikky/shuffle:$NAME -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t frikky/$NAME:$VERSION
docker push frikky/$NAME:$VERSION
#docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
+8 -1
View File
@@ -146,6 +146,9 @@ func initializeImages(dockercli *dockerclient.Client) {
ctx := context.Background()
// check whether theyre the same first
//version := "0.1.0"
// fmt.Sprintf("docker.pkg.github.com/frikky/shuffle/orborus:%s", version),
// fmt.Sprintf("docker.pkg.github.com/frikky/shuffle/worker:%s", version),
images := []string{
fmt.Sprintf("docker.io/%s:app_sdk", baseimagename),
fmt.Sprintf("docker.io/%s:worker", baseimagename),
@@ -155,7 +158,7 @@ func initializeImages(dockercli *dockerclient.Client) {
for _, image := range images {
reader, err := dockercli.ImagePull(ctx, image, pullOptions)
if err != nil {
log.Printf("Failed getting %s", image)
log.Printf("Failed getting %s: %s", image, err)
continue
}
@@ -197,6 +200,10 @@ func main() {
log.Printf("--- Setting up Docker environment. Downloading worker and App SDK! ---")
initializeImages(dockercli)
//workerName := "worker"
//workerVersion := "0.1.0"
//workerImage := fmt.Sprintf("docker.pkg.github.com/frikky/shuffle/%s:%s", workerName, workerVersion)
workerImage := fmt.Sprintf("%s:worker", baseimagename)
log.Printf("--- Finished configuring docker environment ---\n")
+11
View File
@@ -0,0 +1,11 @@
NAME=worker
VERSION=0.1.0
echo "Running docker build with $NAME:$VERSION"
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .
docker build . -t frikky/shuffle:$NAME -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t frikky/$NAME:$VERSION
# Push both for now..
docker push frikky/$NAME:$VERSION
docker push frikky/shuffle:$NAME
#docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION
+11 -11
View File
@@ -1,15 +1,15 @@
echo "Compiling program"
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .
#CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o worker.bin .
echo "Fixing docker env"
docker rmi frikky/shuffle:worker --force
docker build . -t frikky/shuffle:worker
docker push frikky/shuffle:worker
#docker rmi frikky/shuffle:worker --force
#docker build . -t frikky/shuffle:worker
#docker push frikky/shuffle:worker
#docker run \
# --env "AUTHORIZATION=ASD" \
# --env "DOCKER_API_VERSION=1.39" \
# --env "EXECUTIONID=ASD" \
# --env "BASE_URI=$BASE_URI" \
# -v /var/run/docker.sock:/var/run/docker.sock \
# frikky/shuffle:worker
docker run \
--env "AUTHORIZATION=ASD" \
--env "DOCKER_API_VERSION=1.39" \
--env "EXECUTIONID=ASD" \
--env "BASE_URI=$BASE_URI" \
-v /var/run/docker.sock:/var/run/docker.sock \
frikky/shuffle:worker