Coder Social home page Coder Social logo

axelssonhakan / corectl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qlik-oss/corectl

0.0 0.0 0.0 9.81 MB

corectl is a command line tool to perform reloads, fetch metadata and evaluate expressions in Qlik Core apps.

License: Other

Go 98.93% Shell 0.90% Dockerfile 0.17%

corectl's Introduction

CircleCI Go Report Card Latest Version

corectl

Corectl is a command line tool to perform reloads, fetch metadata and evaluate expressions in Qlik Core apps.


Download

On Linux and OS X

 curl --silent --location "https://github.com/qlik-oss/corectl/releases/latest/download/corectl-$(uname -s)-x86_64.tar.gz" | tar xz -C /tmp && mv /tmp/corectl /usr/local/bin/corectl

On Windows with git bash

curl --silent --location "https://github.com/qlik-oss/corectl/releases/latest/download/corectl-windows-x86_64.zip" > corectl.zip && unzip ./corectl.zip -d "$HOME/bin/" && rm ./corectl.zip

You can also download the binary manually from releases.

Examples

This sections describes some commands and configuration that can be used with the corectl tool.

To simplify usage of corectl, basic configurations such as: engine connection details, app and objects, can be described in a configuration file. We have added an example configuration file to this repo here.

corectl will automatically check for a corectl.yml | corectl.yaml file in your current directory, removing the need to pass the config file using flags for each command.

Example configuration:

engine: localhost:9076 # URL and port to running Qlik Associative Engine instance
app: corectl-example.qvf # App name that the tool should open a session against. 
script: ./script.qvs # Path to a script that should be set in the app
connections: # Connections that should be created in the app
  testdata: # Name of the connection
    connectionstring: /data # Connectionstring (qConnectionString) of the connection.
    type: folder # Type of connection

For more information regarding which additional options that are configurable are further described here.

Also check out the blog post about utilizing corectl and catwalk to build your data model here.

Usage

Usage documentation can be found here.

corectl provides auto completion of commands and flags for bash and zsh. To load completion in your shell add the following to your ~/.bashrc or ~/.zshrc file depending on shell.

. <(corectl completion bash) or . <(corectl completion zsh)

Auto completion requires bash-completion to be installed.

Development

Prerequisite

  • golang >= 1.11

Build

Fast and easy - corectl will be built into the $GOPATH/bin and executable directly from bash using corectl

go install

If you want to keep the previous installed version you can use go build and get the binary to the current working directory

go build

Test

The unit tests are run with the go test command:

go test ./...

The integration tests depend on external components. Before they can run, you must accept the Qlik Core EULA by setting the ACCEPT_EULA environment variable, you start the services by using the docker-compose.yml file. The tests are run with the test script:

ACCEPT_EULA=<yes/no> docker-compose up -d
go test corectl_integration_test.go

The tests are by default trying to connect to an engine on localhost:9076 and another one on localhost:9176. This can be changed with the --engineIP flag and --engine2IP flag.

go test corectl_integration_test.go --engineIP HOST:PORT --engine2IP HOST:ANOTHERPORT

If the reference output files need to be updated, run the test with --update flag.

go test corectl_integration_test.go --update

Release

You create a release by pushing a commit and a tag with semantic versioning. CircleCi will then run a release build that uses goreleaser to release corectl with the version set as the git tag.

To create a release for e.g. version v1.0.0:

RELEASE_VERSION=v1.0.0 ./release.sh

The script will update the API specification with the new version, create a commit with a tag and push to origin.

Documentation

The usage documentation is generated using cobra/doc. To regenerate the documentation:

corectl generate-docs

To regenerate the api spec, first build with latest release tag as version and then generate the spec using:

go build -ldflags "-X main.version=$(git describe --abbrev=0 --tags)"
./corectl generate-spec > docs/spec.json

Contributing

We welcome and encourage contributions! Please read Open Source at Qlik R&D for more info on how to get involved.

corectl's People

Contributors

axelssonhakan avatar carlioth avatar fredrikfolkesson avatar gabbaxx avatar glooms avatar qlikossbuild avatar renovate[bot] avatar sublibra avatar wennmo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.