CI/CD Deployment

The jaegertracing/jaeger-lib repository does not currently have a fully established CI/CD deployment process. However, there are several tasks available in the Makefile that can aid in establishing a CI/CD workflow. Below are the defined steps to utilize the existing commands and facilitate your own CI/CD pipeline:

Step 1: Setup Dependencies

Use the install target in the Makefile to install necessary dependencies. This ensures that your project environment is set up correctly.

make install

This command will run the appropriate dependency management based on the USE_DEP or USE_GLIDE flags:

.PHONY: install
install:
ifeq ($(USE_DEP),true)
    dep version || make install-dep
    dep version
    dep ensure -vendor-only
    dep status
else ifeq ($(USE_GLIDE),true)
    glide --version || go get github.com/Masterminds/glide
    glide --version
    glide install
endif

Step 2: Linting and Testing

Integrate linting and testing into your CI/CD pipeline using the test-and-lint target as the .DEFAULT_GOAL:

make test-and-lint

The default goal executes the linting and testing code.

Step 3: Continuous Integration

To set up continuous integration, the test-ci target can be incorporated into your CI configuration. This target includes checks for dependencies, coverage, and linting:

test-ci: dep-check cover lint

Step 4: Code Coverage

You can generate code coverage reports with the cover target. This will create a cover.out file for analysis:

make cover

To produce an HTML report from the coverage data:

make cover-html

Step 5: Deployments and Releases

Although a deployment step is not currently outlined in the repository, you can employ the release process described in RELEASE.md. This can be used to tag and create new releases on GitHub after merging a pull request.

  1. Create a pull request with the title formatted as “Preparing release 2.1.0”.
  2. Update the CHANGELOG.md using recent changes from git log.
  3. Upon merging the PR, create the release on GitHub:
git log --pretty=format:'- %s -- %an'
  1. Tag and release the version:
git tag v2.1.0
git push origin v2.1.0

Conclusion

At present, the jaegertracing/jaeger-lib repository lacks an integrated CI/CD pipeline setup. The steps outlined above offer guidance on how to utilize the available Makefile commands to establish a foundational CI/CD process. To enhance this setup, consider adding further automation tools or integrating with existing CI services such as GitHub Actions.

References

  • Makefile
  • RELEASE.md