Skip to content

Releases: yoanbernabeu/GoJelastic

v0.2.1 - Fix Build

15 Oct 07:22

Choose a tag to compare

v0.2.0 - 🐛 Bug Fix: Exit Code on Error

15 Oct 07:18
cf0220f

Choose a tag to compare

Issue Resolved

This release fixes a critical bug (#10) where the CLI returned exit code 0 (success) even when an error occurred during Jelastic API calls.

Behavior before the fix ❌

$ GoJelastic redeployContainerById \
  --appid $JELASTIC_APPID \
  --token $JELASTIC_TOKEN \
  --url $JELASTIC_URL \
  --nodeid $JELASTIC_NODEID \
  --tag $(git describe --tags --abbrev=0)

# Error response
{
    "error": "The [ jem docker fetch ] operation has failed: Authentication failed",
    "result": 4095,
    "source": "JEL"
}

$ echo $?
0  # ❌ Returns 0 instead of 1

Behavior after the fix ✅

$ GoJelastic redeployContainerById \
  --appid $JELASTIC_APPID \
  --token $JELASTIC_TOKEN \
  --url $JELASTIC_URL \
  --nodeid $JELASTIC_NODEID \
  --tag $(git describe --tags --abbrev=0)

# Error response (written to stderr)
{
    "error": "The [ jem docker fetch ] operation has failed: Authentication failed",
    "result": 4095,
    "source": "JEL"
}

$ echo $?
1  # ✅ Returns 1 correctly

🎯 Impact

This fix is critical for the following use cases:

✅ CI/CD Pipelines

Pipelines can now properly detect failures:

GitLab CI / GitHub Actions

deploy:
  script:
    - |
      ./GoJelastic redeployContainerById \
        --appid $JELASTIC_APPID \
        --token $JELASTIC_TOKEN \
        --url $JELASTIC_URL \
        --nodeid $JELASTIC_NODEID \
        --tag $CI_COMMIT_TAG
    # The pipeline will now fail if deployment fails ✅

✅ Shell Scripts

if ./GoJelastic startEnv --appid myapp --token $TOKEN --url $URL; then
    echo "✅ Environment started successfully"
else
    echo "❌ Failed to start environment (exit code: $?)"
    exit 1
fi

✅ Automation

./GoJelastic stopEnv --appid myapp --token $TOKEN --url $URL || exit 1
./GoJelastic startEnv --appid myapp --token $TOKEN --url $URL || exit 1
echo "✅ Restart successful"

🔧 Technical Details

Changes Made

  1. New JelasticResponse struct

    • Automatically parses JSON responses from the API
    • Detects result and error fields
  2. checkResponseForErrors() function

    • Automatically checks every API response
    • Exits with code 1 if result != 0 or error is not empty
    • Writes errors to stderr instead of stdout
  3. Transparent integration

    • All commands automatically benefit from the fix
    • No behavior change for successful commands
    • 100% backward compatible

Error Detection Conditions

The CLI now returns exit code 1 if:

  • result != 0 OR
  • error is not empty in the JSON response

📦 Update

Installation from Binary

# Linux/Darwin with wget
wget -qO- https://raw.githubusercontent.com/yoanbernabeu/GoJelastic/main/install.sh | bash

# Linux/Darwin with curl
curl -sL https://raw.githubusercontent.com/yoanbernabeu/GoJelastic/main/install.sh | bash

Build from Source

git clone git@github.com:yoanbernabeu/GoJelastic.git
cd GoJelastic
git checkout [VERSION]
go build -o GoJelastic

✅ Testing

  • ✅ Successful compilation without errors
  • ✅ No regression on existing commands
  • ✅ Backward compatible with existing scripts

🙏 Acknowledgments

Thanks to everyone who reported this bug and contributed to its identification. This fix significantly improves the reliability of GoJelastic in production environments and CI/CD pipelines.


Note: This release contains only bug fixes. No new features have been added.

v0.1.6 - Swaps external IP addresses between source and target nodes

04 Oct 13:04
14c43ec

Choose a tag to compare

What's Changed

Full Changelog: v0.1.5...v0.1.6

v0.1.5 - Fix JPS URL

17 Jan 13:55
cd45242

Choose a tag to compare

What's Changed

Full Changelog: v0.1.4...v0.1.5

v0.1.4 - Improve Documentation + Install Custom JPS

16 Jan 21:16
01ead4d

Choose a tag to compare

What's Changed

  • v0.1.4 by @yoanbernabeu in #6
    • Improve and fix documentation
    • Add install command for custom JPS Manifest file

Full Changelog: v0.1.3...v0.1.4

v0.1.3 - New commands and installation simplification

30 Dec 10:47
c36eae5

Choose a tag to compare

What's Changed

  • V0.1.3 - New commands and installation simplification by @yoanbernabeu in #5
    • documentation generation command
    • Gets extended account billing history by period
    • Gets the information about all environments of a user
    • Provides information about firewall rules for the environment
    • Gets information about the user
    • Sends an email with the link to reset the account password
    • Installation simplification for Linux/Darwin environments
    • JSON formatting in terminal return

Full Changelog: v0.1.2...v0.1.3

v0.1.2 - Lots of new command lines and documentation

22 Dec 16:46

Choose a tag to compare

What's Changed

Full Changelog: v0.1.1...0.1.2

v0.1.1 - Using a Configuration File for Token and URL Storage

22 Dec 09:03
6fef4db

Choose a tag to compare

What's Changed

Full Changelog: v0.1.0...v0.1.1

v0.1.0 - Welcome GoJelastic !

21 Dec 15:04

Choose a tag to compare

The official Jelastic command-line interface (CLI) is written in Java, which can make it heavy and inconvenient to use in continuous integration/continuous deployment (CI/CD) environments.

Rewriting the CLI in Go will make it lighter and more portable, allowing it to be easily incorporated into CI/CD pipelines and used on a variety of systems without the need for additional dependencies.

This will make it easier for developers to manage and deploy applications on Jelastic, improving efficiency and streamlining the development process.