@thangha/release-document
v1.0.5
Published
The feature to prepare and announce the release document.
Downloads
1
Readme
Release document Package
This package is used to trigger function to prepare, sign-off and announce the release document.
Configurations:
- step 1: Add this package into the
package.json
file of repo you want to use - step 2: Generate the corresponding
package-lock.json
(ensure that new image will be build successfully) - step 3: Add these 3 line bellow into the
package.json
file and continue remain steps for each step (generate document, sign-off, announce document)
{
...
"scripts": {
...
"prepare-release-doc": "prepare-release-doc",
"sign-off": "sign-off",
"announce-release-doc": "announce-release-doc"
}
}
GENERATE DOCUMENT:
- use command
npm run prepare-release-doc --argName2=value1
instead - param list:
- repoName: string, required
repoName="mmgp-micro-frontend-messaging"
docker run \
-v ~/.ssh:/root/.ssh \
...
-w="/code" \
$(buildkite-agent meta-data get "image-version") \
bash -c "${SOURCE_MOVING} \
&& echo '--- :js: Fetching branches origin/${BUILDKITE_BRANCH} and origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}' \
&& git fetch origin ${BUILDKITE_BRANCH} && git fetch origin ${BUILDKITE_PULL_REQUEST_BASE_BRANCH} \
&& npm run prepare-release-doc -- \
...
--repoName=${repoName} \
--slackToken=${SLACK_TOKEN}"
SIGN-OFF:
- use command
npm run sign-off --argName2=value1
instead - param list:
- serviceName: string, required
- repoName: string, required
- recipient: string, required
- serviceOwner: string, required
- changeOwner: string, required
- slackChannel: string, required
serviceName="HUB Inbox MFE"
repoName="mmgp-micro-frontend-messaging"
recipient="<@U02B9519VA6>"
serviceOwner="<@U02B9519VA6>"
changeOwner="<@U02B9519VA6>"
slackChannel="C03A9ALDD9U"
docker run \
-v ~/.ssh:/root/.ssh \
...
$(buildkite-agent meta-data get "image-version") \
bash -c "${SOURCE_MOVING} \
&& echo '--- :js: Fetching branche origin/${BUILDKITE_BRANCH}' \
&& git fetch origin ${BUILDKITE_BRANCH} \
&& npm run sign-off -- \
--source=origin/${BUILDKITE_BRANCH} \
--repoName=${repoName} \
--serviceName=${serviceName} \
--recipient=${recipient} \
--serviceOwner=${serviceOwner} \
--changeOwner=${changeOwner} \
--slackChannel=${slackChannel} \
--slackToken=${SLACK_TOKEN}"
ANNOUNCE DOCUMENT:
- use command
npm announce-release-doc --argName2=value1
instead - param list:
- repoName: string, required
repoName="mmgp-micro-frontend-messaging"
docker run \
-v ~/.ssh:/root/.ssh \
-v ${SSH_AUTH_SOCK}:/ssh-agent \
-v ${PWD}:${MOUNTED_DIR} \
-e "SSH_AUTH_SOCK=/ssh-agent" \
-e "BUILDKITE_BRANCH" \
-e "SLACK_TOKEN" \
-e "HUSKY" \
-w="/code" \
$(buildkite-agent meta-data get "image-version") \
bash -c "${SOURCE_MOVING} \
&& echo '--- :js: Fetching branche origin/${BUILDKITE_BRANCH}' \
&& git fetch origin ${BUILDKITE_BRANCH} \
&& npm run announce-release-doc -- \
--source=origin/${BUILDKITE_BRANCH} \
--repoName=${repoName} \
--slackToken=${SLACK_TOKEN} "