diff --git a/.buddy/publish.yml b/.buddy/publish.yml new file mode 100644 index 0000000..6640eb2 --- /dev/null +++ b/.buddy/publish.yml @@ -0,0 +1,43 @@ +- pipeline: '[xendit-whmcs] Publish Plugin Notification' + trigger_mode: ON_EVERY_PUSH + ref_name: (refs/tags/v\d+\.\d+\.\d+$) + ref_type: WILDCARD + fetch_all_refs: true + trigger_condition: ALWAYS + worker_assignment: TAGS + variables: + - key: INVOICE_SLACK_GROUP + value: "@checkout-devs" + description: invoice slack group + - key: PUBLISH_URL + value: "https://marketplace.whmcs.com/product/6411/edit" + description: publish url + actions: + - action: Prepare Env Variables + type: BUILD + integration_hash: "5e85761fc5f225000f97dd99" + trigger_condition: ALWAYS + working_directory: "/buddy/xendit-whmcs" + region: ap-southeast-1 + docker_image_name: "xendit/alpine" + docker_image_tag: "1.0" + execute_commands: + - set -e + - COMMIT_DATE_ISO="$(git show ${BUDDY_EXECUTION_REVISION} --format=%cd --date=iso | head -n 1)" + - export COMMIT_DATE=$(LC_TIME="C" TZ="Asia/Jakarta" date +'%y.%m.%d-%H.%M' --date="${COMMIT_DATE_ISO}") + - export RELEASE_TAG="${BUDDY_EXECUTION_REVISION_SHORT}-${COMMIT_DATE}-${APP_ENV_MODE}" + - export COMMIT_MESSAGE="$(git log -1 --pretty=oneline --abbrev-commit --format=\"%B\" | head -n 1)" + - export CHANGE_CAUSE="${RELEASE_TAG} - ${COMMIT_MESSAGE}" + - export VERSION_TAG="${BUDDY_EXECUTION_TAG}" + - export GIT_TAG="${BUDDY_EXECUTION_TAG}" + - export GIT_BRANCH="${BUDDY_EXECUTION_BRANCH}" + shell: BASH + - action: Notify deployment finished to tpi-plugin-release + type: SLACK + integration_hash: 5ea6524a42eba4000eb35fbb + trigger_condition: ALWAYS + channel: C08G5D33LE9 + channel_name: tpi-plugin-release + attachments: + - '{"fallback":"$BUDDY_PIPELINE_NAME execution + #$BUDDY_EXECUTION_ID","color":"good","fields":[{"title":"*[$BUDDY_PROJECT_NAME]*","value":"✅ New version $VERSION_TAG of $BUDDY_PROJECT_NAME detected! \n Please edit the version inside the marketplace through [this link]($PUBLISH_URL) \n cc: $INVOICE_SLACK_GROUP","short":false}]}' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 87c1b75..0eaf821 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Blacklist files/folders in same directory as the .gitignore file -/* vendor +/.vscode +/test.sh # Whitelist some files !.gitignore