Skip to content

Commit

Permalink
Merge branch 'public-release/v1.1.0-223' into public-release/v1.1.0-231
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzianis Lisiankou authored and Dzianis Lisiankou committed Sep 7, 2023
2 parents a95282c + 87dc87e commit 35f0862
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
jdkVersion:
description: "JDK version"
required: false
default: "11"
default: "17"

runs:
using: "composite"
Expand Down
46 changes: 33 additions & 13 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup of environment
uses: ./.github/actions/setup

- name: Check repopository content
- name: Check repository content
shell: bash
run: pwd && ls -la

Expand Down Expand Up @@ -65,13 +65,16 @@ jobs:
concurrency: test
environment:
name: test
url: http://178.172.233.157/plugin-builds/${{steps.extract_branch.outputs.BRANCH_NAME}}/${{ steps.generate_file_name.outputs.NEW_FILE_NAME }}
url: http://178.172.233.157/plugin-builds/${{steps.extract_branch.outputs.BRANCH_NAME_FOR_DEPLOY}}/${{ steps.generate_file_name.outputs.NEW_FILE_NAME_FOR_DEPLOY }}

steps:
- name: Extract branch name
id: extract_branch
shell: bash
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
run: >
echo "BRANCH_NAME_FOR_DEPLOY=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT &&
echo "BRANCH_NAME_LOCAL=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV &&
echo "Github branch name is: $BRANCH_NAME_LOCAL"
- name: Check current directory
shell: bash
Expand All @@ -91,22 +94,39 @@ jobs:
id: getting_file_name
shell: bash
run: >
CURRENT_FILE_NAME_PATH=$(echo $(find build -name "for-mainframe*")) &&
echo "Name of current file: $CURRENT_FILE_NAME_PATH" &&
echo "CURRENT_FILE_NAME_PATH=$CURRENT_FILE_NAME_PATH" >> $GITHUB_OUTPUT
CURRENT_FILE_PATH=$(echo $(find build -name "for-mainframe*")) &&
echo "CURRENT_FILE_PATH=$CURRENT_FILE_PATH" >> $GITHUB_ENV &&
echo "Name of current file: $CURRENT_FILE_PATH"
- name: Generate new name for built plugin
id: generate_file_name
shell: bash
run: >
TEMP_VAR=${{ steps.getting_file_name.outputs.CURRENT_FILE_NAME_PATH }}
NEW_FILE_NAME="$(echo ${TEMP_VAR%.zip*})."$(date +"%Y-%m-%dT%H:%M:%S%:z" | tr ':' _)".zip" &&
NEW_FILE_NAME=${NEW_FILE_NAME##*/} &&
echo "Name of new file: $NEW_FILE_NAME" &&
echo "NEW_FILE_NAME=$NEW_FILE_NAME" >> $GITHUB_OUTPUT
TEMP_VAR=$CURRENT_FILE_PATH
NEW_FILE_NAME_LOCAL="$(echo ${TEMP_VAR%.zip*})."$(date +"%Y-%m-%dT%H:%M:%S%:z" | tr ':' _)".zip" &&
NEW_FILE_NAME_LOCAL=${NEW_FILE_NAME_LOCAL##*/} &&
echo "NEW_FILE_NAME_LOCAL=$NEW_FILE_NAME_LOCAL" >> $GITHUB_ENV &&
echo "Name of new file: $NEW_FILE_NAME_LOCAL" &&
echo "NEW_FILE_NAME_FOR_DEPLOY=$NEW_FILE_NAME_LOCAL" >> $GITHUB_OUTPUT &&
NEW_FILE_PATH="/var/www/plugin-builds/$BRANCH_NAME_LOCAL/$NEW_FILE_NAME_LOCAL" &&
echo "NEW_FILE_PATH=$NEW_FILE_PATH" >> $GITHUB_ENV &&
echo "Path to new file: $NEW_FILE_PATH"
- name: Move built plugin to destination folder
shell: bash
run: >
mkdir -p /var/www/plugin-builds/${{ steps.extract_branch.outputs.branch }} &&
mv ${{ steps.getting_file_name.outputs.CURRENT_FILE_NAME_PATH }} /var/www/plugin-builds/${{ steps.extract_branch.outputs.BRANCH_NAME }}/${{ steps.generate_file_name.outputs.NEW_FILE_NAME }}
mkdir -p /var/www/plugin-builds/$BRANCH_NAME_LOCAL &&
mv $CURRENT_FILE_PATH $NEW_FILE_PATH
- name: Sign archives
shell: bash
run: >
echo "use-agent" >> ~/.gnupg/gpg.conf &&
echo "agent-write-to-file passed" &&
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf &&
echo "pinentry-mode write to file passed" &&
export GPG_TTY=$(tty) &&
echo "export GPG tty variable passed" &&
eval $(gpg-agent --daemon) &&
echo "starting gpg-agent passed" &&
gpg --batch --passphrase "${{ secrets.GPG_PASSPHRASE }}" --detach-sign --armor --output $NEW_FILE_PATH.asc $NEW_FILE_PATH

0 comments on commit 35f0862

Please sign in to comment.