-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial support for finalize plugins
waiter waiter! more breaking changes please!! (this is a breaking change)
- Loading branch information
Showing
11 changed files
with
165 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package api | ||
|
||
// / Get the final tagged Image name | ||
var IMAEGNAME = 1 | ||
|
||
// / Get the final tagged Image ID | ||
var IMAGEID = 2 | ||
|
||
// / Get the build recipe | ||
var RECIPE = 4 | ||
|
||
// / Get a read-write filesystem of the Image | ||
var RWFS = 8 | ||
|
||
// / Get a read-only filesystem of the Image | ||
var ROFS = 16 | ||
|
||
// / Prepare the filesystem to be chrooted into, requires either RWFilesystem or ROFilesystem | ||
var CHROOTFS = 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package main | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
|
||
"C" | ||
|
||
"github.com/vanilla-os/vib/api" | ||
) | ||
|
||
type DockerRemote struct { | ||
Name string `json:"name"` | ||
Type string `json:"type"` | ||
OCIRegistry string `json:"registry"` | ||
ImageName string `json:"imagename"` | ||
ImageTag string `json:"imagetag"` | ||
} | ||
|
||
//export PluginScope | ||
func PluginScope() int32 { // int32 is defined as GoInt32 in cgo which is the same as a C int | ||
return int32(api.IMAEGNAME) | ||
} | ||
|
||
//export FinalizeBuild | ||
func FinalizeBuild(moduleInterface *C.char, extraData *C.char) *C.char { | ||
var module *DockerRemote | ||
|
||
err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module) | ||
if err != nil { | ||
return C.CString(fmt.Sprintf("ERROR: %s", err.Error())) | ||
} | ||
|
||
return C.CString("ERROR: failed to upload image") | ||
} | ||
|
||
func main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters