Scripts to run automation between Liferay, Testray, and Jira.
Mac
brew install pythonLinux (Ubuntu/Debian)
sudo apt update && sudo apt install python3Fedora
sudo dnf install python3Mac
If you installed Python via Homebrew, pip is already included.
Linux (Ubuntu/Debian)
sudo apt install python3-pipFedora
sudo dnf install python3-pipThis is required to check Jira ticket statuses and for future Jira automation features.
sudo npm install -g jira-clijira config🔗 More info: npmjs.com/package/jira-cli
Clone this repo into your preferred working directory:
gh repo clone magjed4289/TestrayAutomatedTasks-
Move the
.automated_tasks.envfile outside and at the same level as theTestrayAutomatedTasksdirectory. -
Edit
.automated_tasks.envand fill in the required variables.
Your file tree should look like this:
your-workspace/
├── TestrayAutomatedTasks/
└── .automated_tasks.env
- Go to your Jira Profile → Manage Your Account → Security tab.
- Under API tokens, click Create and manage API tokens.
- Generate a new token and copy it.
-
In your home directory (
~), create a hidden folder named.jira-user:mkdir ~/.jira-user -
Inside the
.jira-userfolder, create two files (no file extensions):token: Paste your copied API token into this file.user: Enter the email address associated with your Jira account.
Your folder structure should look like this:
~/.jira-user/ ├── token └── user
- When you run the automation script for the first time:
- Your API token will be securely encrypted for future use.
- The plain
tokenfile will be automatically deleted after encryption.
From the root of the TestrayAutomatedTasks directory:
pip install -r requirements.txtRun the script from the correct subdirectory:
cd /your/path/to/repo/TestrayAutomatedTasks/liferay/teams/headless
python3 headless_testray.pyTo avoid typing the full path every time, you can add an alias in your .bashrc or .zshrc:
alias rta='cd /your/path/to/TestrayAutomatedTasks && \
[ -d ".venv" ] || python3 -m venv .venv && \
source .venv/bin/activate && \
pip install -r requirements.txt && \
cd liferay/teams/headless && \
python3 headless_testray.py'After saving, apply the changes:
source ~/.bashrc
# or if using zsh
source ~/.zshrcNow you can run the automation with:
rta