Comments (1)
Testing basic scenario
Using server example
version: 0
variables:
VAR_ONE: andrei
build:
generate-api:
input: openapi.yaml
cmd: |-
oapi-codegen -package generated -generate types -o server/rest-api/generated/types.gen.go openapi.yaml
oapi-codegen -package generated -generate server -o server/rest-api/generated/server.gen.go openapi.yaml
target: |-
server/rest-api/generated/types.gen.go
server/rest-api/generated/server.gen.go
build:
input: |-
./server
go.mod
go.sum
main.go
cmd: go build -o ./build/server main.go
dependson:
- generate-api
- show
target: /build/server
show:
cmd: env
run:
server:
type: binary
path: ./build/server
dependson:
- build
- database
database:
type: compose
path: docker-compose.yml
use-nix: true
dependencies:
- oapi-codegen
- go_1_18
Running bob build
will fail with go: module cache not found: neither GOMODCACHE nor GOPATH is set
.
Running bob build --env=GOPATH
will fail with build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
.
Running bob build --env=GOPATH --env=HOME
will run build successfully.
Testing priority when same value is set on bobfile and cli
Running bob build show --no-cache
will display:
show running task...
show PATH=/nix/store/j9rc786ylq8cid4zgcn6idknilkbd4ax-bash-5.1-p16/bin:/nix/store/l2xyarvzahpz3fysr9hqbvcsgv5gnrnk-coreutils-9.1/bin:/nix/store/l62i4fn54qry9xamnj209wfizpw2bng5-gnused-4.8/bin:/nix/store/ip1zdc23sqyq15957lbjrxj31m5xh72c-findutils-4.9.0/bin:/nix/store/hcx4wnpn7gf6pccmzv4s547rv5w6pj0f-oapi-codegen-1.9.1/bin:/nix/store/i8zpdbzds1975lf0k1kc7awzsjn7rlp5-go-1.18.3/bin
show VAR_ONE=andrei
show ...done
Running bob build show --no-cache --env VAR_ONE=matthias
will display:
show running task...
show PATH=/nix/store/j9rc786ylq8cid4zgcn6idknilkbd4ax-bash-5.1-p16/bin:/nix/store/l2xyarvzahpz3fysr9hqbvcsgv5gnrnk-coreutils-9.1/bin:/nix/store/l62i4fn54qry9xamnj209wfizpw2bng5-gnused-4.8/bin:/nix/store/ip1zdc23sqyq15957lbjrxj31m5xh72c-findutils-4.9.0/bin:/nix/store/hcx4wnpn7gf6pccmzv4s547rv5w6pj0f-oapi-codegen-1.9.1/bin:/nix/store/i8zpdbzds1975lf0k1kc7awzsjn7rlp5-go-1.18.3/bin
show VAR_ONE=matthias
show ...done
from bob.
Related Issues (20)
- input-hash: environment is leaking into input-hash
- `target dirs` avoid deleting user generated target dirs
- bug: cancelling a task can still produce a `...done`
- ignore targets of child tasks
- docker images
- Stop and return error when target has not been created
- Go binaries built with CGO_ENABLED=1 do not work through nix HOT 2
- Podman HOT 3
- Continuous build
- Aqua versus nix HOT 1
- Feature Request: Discover build inputs automatically for Go apps based on imports HOT 2
- Feature Request: support configuration directly in nix flakes HOT 3
- Bob nix cache is outdated after `nix-store --gc` HOT 2
- Is there a way to list all existing tasks? HOT 2
- Add option to show logs when a dependson fail
- K8s support
- How do I uninstall Bob?
- Make list of updated inputs available as variable
- Enable the use of a `shell.nix` file as environment definition. HOT 2
- Informational: created and published a devcontainer feature for bob HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bob.