testing a full build
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git-indra.lan/indra-labs/indra/pkg/docker"
|
"git-indra.lan/indra-labs/indra/pkg/docker"
|
||||||
|
"github.com/docker/docker/api/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -72,25 +73,25 @@ var buildConfigurations = []docker.BuildConfiguration{
|
|||||||
// PullParent: false,
|
// PullParent: false,
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
//docker.BuildConfiguration{
|
docker.BuildConfiguration{
|
||||||
// Name: defaultRepositoryName + "/" + "indra-build",
|
Name: defaultRepositoryName + "/" + "indra-build",
|
||||||
// ContextFilePath: "/tmp/indra-build.tar",
|
ContextFilePath: "/tmp/indra-build.tar",
|
||||||
// BuildOpts: types.ImageBuildOptions{
|
BuildOpts: types.ImageBuildOptions{
|
||||||
// Dockerfile: "docker/build/build.Dockerfile",
|
Dockerfile: "docker/build/build.Dockerfile",
|
||||||
// Tags: []string{
|
Tags: []string{
|
||||||
// "dev",
|
"dev",
|
||||||
// },
|
},
|
||||||
// BuildArgs: map[string]*string{
|
BuildArgs: map[string]*string{
|
||||||
// "source_image": strPtr("indralabs/indra-source"),
|
"source_image": strPtr("indralabs/indra-source"),
|
||||||
// "source_version": strPtr("dev"),
|
"source_version": strPtr("dev"),
|
||||||
// "builder_image": strPtr(defaultBuilderContainer),
|
"builder_image": strPtr(defaultBuilderContainer),
|
||||||
// "target_name": strPtr("indra"),
|
"target_name": strPtr("indra"),
|
||||||
// "target_build_script": strPtr("docker/build/targets/indra.sh"),
|
"target_build_script": strPtr("docker/build/targets/indra.sh"),
|
||||||
// },
|
},
|
||||||
// SuppressOutput: false,
|
SuppressOutput: false,
|
||||||
// Remove: true,
|
Remove: true,
|
||||||
// ForceRemove: true,
|
ForceRemove: true,
|
||||||
// PullParent: false,
|
PullParent: false,
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git-indra.lan/indra-labs/indra/pkg/docker"
|
"git-indra.lan/indra-labs/indra/pkg/docker"
|
||||||
|
"github.com/docker/docker/api/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -69,24 +70,24 @@ var packagingConfigurations = []docker.BuildConfiguration{
|
|||||||
// PullParent: false,
|
// PullParent: false,
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
//docker.BuildConfiguration{
|
docker.BuildConfiguration{
|
||||||
// Name: defaultRepositoryName + "/" + "indra-package",
|
Name: defaultRepositoryName + "/" + "indra-package",
|
||||||
// ContextFilePath: "/tmp/indra-package.tar",
|
ContextFilePath: "/tmp/indra-package.tar",
|
||||||
// BuildOpts: types.ImageBuildOptions{
|
BuildOpts: types.ImageBuildOptions{
|
||||||
// Dockerfile: "docker/build/package.Dockerfile",
|
Dockerfile: "docker/build/package.Dockerfile",
|
||||||
// Tags: []string{
|
Tags: []string{
|
||||||
// "dev",
|
"dev",
|
||||||
// },
|
},
|
||||||
// BuildArgs: map[string]*string{
|
BuildArgs: map[string]*string{
|
||||||
// "binaries_image": strPtr("indralabs/indra-build"),
|
"binaries_image": strPtr("indralabs/indra-build"),
|
||||||
// "binaries_version": strPtr("dev"),
|
"binaries_version": strPtr("dev"),
|
||||||
// "packaging_image": strPtr(defaultPackagingContainer),
|
"packaging_image": strPtr(defaultPackagingContainer),
|
||||||
// "target_name": strPtr("indra"),
|
"target_name": strPtr("indra"),
|
||||||
// },
|
},
|
||||||
// SuppressOutput: false,
|
SuppressOutput: false,
|
||||||
// Remove: true,
|
Remove: true,
|
||||||
// ForceRemove: true,
|
ForceRemove: true,
|
||||||
// PullParent: false,
|
PullParent: false,
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "git-indra.lan/indra-labs/indra/pkg/docker"
|
import (
|
||||||
|
"git-indra.lan/indra-labs/indra/pkg/docker"
|
||||||
|
"github.com/docker/docker/api/types"
|
||||||
|
)
|
||||||
|
|
||||||
var sourceConfigurations = []docker.BuildConfiguration{
|
var sourceConfigurations = []docker.BuildConfiguration{
|
||||||
//docker.BuildConfiguration{
|
//docker.BuildConfiguration{
|
||||||
@@ -60,23 +63,23 @@ var sourceConfigurations = []docker.BuildConfiguration{
|
|||||||
// PullParent: false,
|
// PullParent: false,
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
//docker.BuildConfiguration{
|
docker.BuildConfiguration{
|
||||||
// Name: defaultRepositoryName + "/" + "indra-source",
|
Name: defaultRepositoryName + "/" + "indra-source",
|
||||||
// ContextFilePath: "/tmp/indra-source-local.tar",
|
ContextFilePath: "/tmp/indra-source-local.tar",
|
||||||
// BuildOpts: types.ImageBuildOptions{
|
BuildOpts: types.ImageBuildOptions{
|
||||||
// Dockerfile: "docker/sources/indra/local.Dockerfile",
|
Dockerfile: "docker/sources/indra/local.Dockerfile",
|
||||||
// Tags: []string{
|
Tags: []string{
|
||||||
// "dev",
|
"dev",
|
||||||
// },
|
},
|
||||||
// BuildArgs: map[string]*string{
|
BuildArgs: map[string]*string{
|
||||||
// "sourcing_image": strPtr(defaultBuilderContainer),
|
"sourcing_image": strPtr(defaultBuilderContainer),
|
||||||
// },
|
},
|
||||||
// SuppressOutput: false,
|
SuppressOutput: false,
|
||||||
// Remove: true,
|
Remove: true,
|
||||||
// ForceRemove: true,
|
ForceRemove: true,
|
||||||
// PullParent: false,
|
PullParent: false,
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
//docker.BuildConfiguration{
|
//docker.BuildConfiguration{
|
||||||
// Name: defaultRepositoryName + "/" + "indra-source",
|
// Name: defaultRepositoryName + "/" + "indra-source",
|
||||||
// ContextFilePath: "/tmp/indra-source.tar",
|
// ContextFilePath: "/tmp/indra-source.tar",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ RUN set -ex "cleaning up repository" \
|
|||||||
WORKDIR /tmp/indra-source
|
WORKDIR /tmp/indra-source
|
||||||
|
|
||||||
RUN set -ex echo "downloading modules" \
|
RUN set -ex echo "downloading modules" \
|
||||||
&& go mod vendor
|
&& GOINSECURE=git-indra.lan/* GOPRIVATE=git-indra.lan/* go mod vendor
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
|
|||||||
1
go.sum
1
go.sum
@@ -155,7 +155,6 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOF
|
|||||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
|
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
|
||||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng=
|
|
||||||
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||||
github.com/btcsuite/btcwallet v0.16.5 h1:4DTJ5aYAJomcR0jAb6JP8D0wNSxfz4H7WN/RBtNZY4o=
|
github.com/btcsuite/btcwallet v0.16.5 h1:4DTJ5aYAJomcR0jAb6JP8D0wNSxfz4H7WN/RBtNZY4o=
|
||||||
github.com/btcsuite/btcwallet v0.16.5/go.mod h1:mM19pFB3lGVxOL+kvHhHZAhdSWXKsZGiHvpJVvxL0D8=
|
github.com/btcsuite/btcwallet v0.16.5/go.mod h1:mM19pFB3lGVxOL+kvHhHZAhdSWXKsZGiHvpJVvxL0D8=
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ func AddHandler(handler func()) {
|
|||||||
// all other callbacks and exits if not already done.
|
// all other callbacks and exits if not already done.
|
||||||
_, loc, line, _ := runtime.Caller(1)
|
_, loc, line, _ := runtime.Caller(1)
|
||||||
msg := fmt.Sprintf("%s:%d", loc, line)
|
msg := fmt.Sprintf("%s:%d", loc, line)
|
||||||
log.T.Ln("\n"+strings.Split(msg, indra.PathBase)[1],
|
log.T.Ln("\n"+strings.Split(msg, indra.PathBase)[0],
|
||||||
"added interrupt handler")
|
"added interrupt handler")
|
||||||
if ch == nil {
|
if ch == nil {
|
||||||
ch = make(chan os.Signal)
|
ch = make(chan os.Signal)
|
||||||
|
|||||||
@@ -83,5 +83,7 @@ func Shutdown() {
|
|||||||
|
|
||||||
isRunning = false
|
isRunning = false
|
||||||
|
|
||||||
|
inUse.Unlock()
|
||||||
|
|
||||||
log.I.Ln("- rpc server shutdown completed")
|
log.I.Ln("- rpc server shutdown completed")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ package seed
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git-indra.lan/indra-labs/indra/pkg/p2p"
|
"git-indra.lan/indra-labs/indra/pkg/p2p"
|
||||||
|
"git-indra.lan/indra-labs/indra/pkg/rpc"
|
||||||
"git-indra.lan/indra-labs/indra/pkg/storage"
|
"git-indra.lan/indra-labs/indra/pkg/storage"
|
||||||
|
"github.com/tutorialedge/go-grpc-tutorial/chat"
|
||||||
|
"google.golang.org/grpc"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,6 +67,22 @@ func Run(ctx context.Context) {
|
|||||||
// Ready!
|
// Ready!
|
||||||
//
|
//
|
||||||
|
|
||||||
|
go rpc.RunWith(func(srv *grpc.Server) {
|
||||||
|
chat.RegisterChatServiceServer(srv, &chat.Server{})
|
||||||
|
})
|
||||||
|
|
||||||
|
select {
|
||||||
|
case err := <-rpc.WhenStartFailed():
|
||||||
|
log.E.Ln("rpc can't start:", err)
|
||||||
|
startupErrors <- err
|
||||||
|
return
|
||||||
|
case <-rpc.IsReady():
|
||||||
|
// continue
|
||||||
|
case <-ctx.Done():
|
||||||
|
Shutdown()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
log.I.Ln("seed is ready")
|
log.I.Ln("seed is ready")
|
||||||
isReadyChan <- true
|
isReadyChan <- true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user