Skip to main content

tkn pac version

Display the version information for the tkn-pac CLI.

Synopsis

tkn pac version

Description

The version command displays the version of the tkn-pac CLI you have installed. This is useful for:
  • Verifying installation
  • Checking if updates are available
  • Reporting issues (version info is helpful for troubleshooting)
  • Ensuring compatibility with your Pipelines-as-Code installation

Usage Examples

# Display version
tkn pac version

Output Example

$ tkn pac version

Pipelines-as-Code version: v0.25.0
For development/nightly builds:
$ tkn pac version

Pipelines-as-Code version: v0.25.0-dev+abc123.20240315

Version Format

Stable Releases

Format: vMAJOR.MINOR.PATCH
v0.25.0
 │  │  └─ Patch version (bug fixes)
 │  └─── Minor version (features)
 └───── Major version (breaking changes)

Development Builds

Format: vMAJOR.MINOR.PATCH-dev+COMMIT.DATE
v0.25.0-dev+abc123.20240315
            │      └─ Build date (YYYYMMDD)
            └────── Commit SHA (first 6 chars)

Checking for Updates

To see if a newer version is available:
  1. Check your version:
    tkn pac version
    
  2. Visit releases page:
    open https://github.com/openshift-pipelines/pipelines-as-code/releases/latest
    
  3. Compare versions:
    • Your version: v0.24.0
    • Latest release: v0.25.0
    • Update available!

Version Compatibility

Ensure your CLI version is compatible with:

Pipelines-as-Code Controller

CLI VersionController VersionCompatible
v0.25.xv0.25.x✅ Yes
v0.25.xv0.24.x✅ Yes (usually)
v0.25.xv0.23.x⚠️ Maybe
v0.25.xv0.20.x❌ No
Best practice: Keep CLI and controller versions in sync or within 1-2 minor versions.

Tekton Pipelines

PAC VersionTekton VersionStatus
v0.25.xv0.50.x+✅ Recommended
v0.25.xv0.47.x+✅ Supported
v0.25.xv0.44.x+⚠️ Limited support
v0.25.x< v0.44.x❌ Not supported

Kubernetes

PAC VersionKubernetes Version
v0.25.x1.27+ (recommended)
v0.25.x1.24+ (supported)
v0.25.x1.21+ (limited)

Common Use Cases

Bug Reports

When reporting issues, always include version info:
# Get version
tkn pac version

# Include in bug report
Example bug report:
## Environment

- tkn-pac version: v0.25.0
- Kubernetes version: 1.28
- Tekton Pipelines: v0.53.0
- Platform: Linux x86_64

## Issue Description
...

Version Verification After Install

# Install
brew install openshift-pipelines/pipelines-as-code/tektoncd-pac

# Verify
tkn pac version
# Expected: Latest stable release

Version Verification After Upgrade

# Before upgrade
tkn pac version
# v0.24.0

# Upgrade
brew upgrade openshift-pipelines/pipelines-as-code/tektoncd-pac

# After upgrade
tkn pac version
# v0.25.0

CI/CD Pipelines

.github/workflows/pipeline.yaml
steps:
- name: Install tkn-pac
  run: |
    brew install openshift-pipelines/pipelines-as-code/tektoncd-pac
    
- name: Verify installation
  run: |
    tkn pac version
    
- name: Run pipeline
  run: |
    tkn pac resolve -f .tekton/pr.yaml | kubectl apply -f -

Troubleshooting

Command Not Found

$ tkn pac version
command not found: tkn
Solution:
  1. Verify installation:
    which tkn-pac
    
  2. Check PATH:
    echo $PATH
    
  3. Reinstall if needed:
    brew install openshift-pipelines/pipelines-as-code/tektoncd-pac
    

Old Version Showing

$ tkn pac version
Pipelines-as-Code version: v0.20.0  # Expected v0.25.0
Solution:
  1. Check for multiple installations:
    which -a tkn-pac
    # /usr/local/bin/tkn-pac
    # /opt/homebrew/bin/tkn-pac
    
  2. Remove old version:
    sudo rm /usr/local/bin/tkn-pac
    
  3. Verify again:
    tkn pac version
    

Development Version in Production

$ tkn pac version
Pipelines-as-Code version: v0.25.0-dev+abc123.20240315
This is a development build. For production use:
  1. Uninstall dev version
  2. Install stable release:
    brew install openshift-pipelines/pipelines-as-code/tektoncd-pac
    

Mismatch with Controller

If CLI and controller versions differ significantly:
# Check controller version
kubectl get configmap pipelines-as-code-info \
  -n pipelines-as-code \
  -o jsonpath='{.data.version}'

# Output: v0.25.0
If versions don’t match:
  • Update CLI to match controller
  • Or update controller to match CLI

Release Notes

View what’s new in each version:
# Visit releases page
open https://github.com/openshift-pipelines/pipelines-as-code/releases

Changelog

Detailed changes:
open https://github.com/openshift-pipelines/pipelines-as-code/blob/main/CHANGELOG.md

Latest Stable Release

open https://github.com/openshift-pipelines/pipelines-as-code/releases/latest

Flags

The version command accepts no flags. It simply displays the version and exits.

Exit Codes

CodeMeaning
0Success - version displayed
1Error - command failed

Version Information in Other Commands

Some commands include version checks:
# Bootstrap checks compatibility
tkn pac bootstrap
# => Checking versions...
# => CLI: v0.25.0
# => Controller: v0.25.0
# ✓ Versions compatible

See Also


Quick Reference:
# Show version
tkn pac version

# Update to latest
brew upgrade openshift-pipelines/pipelines-as-code/tektoncd-pac

# Verify update
tkn pac version

Build docs developers (and LLMs) love