Follow the instructions at Developer Guide to create developer environment on a Mac or Linux machine.
Modifying Developer Environment
Follow the instructions at Packer Changes to make changes to the install time build environments. For other runtime changes appropriate Vagrantfile, as found in [vagrant-files] directory, would need to be modified.
Most commonly used make targets.
These tasks can be used to replicate the CI environment for this directory:
makeDefault target which runs everything.
ws-toolsThis will build all the binaries that we need for code styling and building. Always run this to ensure that you have a consistent toolchain.
checksRuns goimports, lint and vet. These tools will ensure that code meets style guidelines by running formatting and validates source code
genRuns all auto generated code. Including .pb.go, REST and CRUD handlers, CLI handlers.
buildBuilds all source code.
unit-test-coverRuns all unit tests in coverage mode. This will fail if the coverage on the package is < 75%
clusterBuilds all the binaries, containerizes everything and deploys on kubernetes.
make devBrings up the standard development vagrant VMs.
e2eruns an end to end cluster tests.
I want to import a new package
Follow changes in vendoring guidelines
I have unrelated auto-generated diffs in my PR
This is usually due to inconsistent versions of gen tools. Always run
make ws-tools and ensure that
all the binaries are from
$GOPATH/bin/. Avoid doing a
go get -u <package>. Vendor it and add it to
TO_INSTALL directive in the Makefile. This ensures that everyone will have the same version.
I need to containerize my binary.
Add this to
TO_DOCKERIZE directive in the makefile.
I have a package that I don't want to build.
Add this to
EXCLUDE_PATTERNS directive in the makefile.
I need to upgrade CI Base images
We use jobd Every top level target has a
box-base.rb to declare what environment you need and
.job.yml to declare what your targets are.
If you're trying to install a new package, avoid
go get. Instead vendor and add it
I need to version and upgrade nic sanities base images
Run the following
1. Make changes in nic/box-deps.rb and in nic/Vagrantfile 2. Upgrade all the version numbers in nic/Makefile, nic/box.rb and any other targets that depend on pensando/nic 3. make -C nic deps-release 4. Push the new container to the registry.test.pensando.io:5000 5. Create a PR and also test locally with a make -C nic shell
I have questions that are not answered here.
Shoot an email to
email@example.com or reach out to
#sw slack channel.