Skip to content

Commit

Permalink
Merge pull request #3 from ROKT/fix-plugin-name
Browse files Browse the repository at this point in the history
Adjusted to new public plugin
  • Loading branch information
CloutKhan authored Aug 3, 2021
2 parents 7747e0f + 447b91f commit 6fbae1a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 18 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lint:
docker-compose run --rm lint
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ steps:
- label: "Single Deployment Step"
key: "deployment:${ENVIRONMENT}:${REGION}:single-deployment-step"
plugins:
- rokt/tag-release#v1.0.0:
mark_pending: true
- ROKT/tag-release#v1.0.3-beta:
mark_completed: true
```
Expand All @@ -41,12 +40,13 @@ steps:
- label: "First Deployment Step"
key: "deployment:${ENVIRONMENT}:${REGION}:first-deployment-step"
plugins:
- rokt/tag-release#v1.0.0:
- ROKT/tag-release#v1.0.3-beta:
mark_pending: true

- label: "Final Deployment Step"
key: "deployment:${ENVIRONMENT}:${REGION}:last-deployment-step"
- rokt/tag-release#v1.0.0:
plugins:
- ROKT/tag-release#v1.0.3-beta:
mark_completed: true
```
Expand All @@ -61,21 +61,21 @@ steps:
- label: "Deploy Service One"
key: "deployment:${ENVIRONMENT}:${REGION}:deploy-service-one"
plugins:
- rokt/tag-release#v1.0.0:
- ROKT/tag-release#v1.0.3-beta:
mark_pending: true
mark_completed: true
tag_identifier: service-one

- label: "Begin Deployment of Service Two"
key: "deployment:${ENVIRONMENT}:${REGION}:begin-deploy-service-two"
plugins:
- rokt/tag-release#v1.0.0:
- ROKT/tag-release#v1.0.3-beta:
mark_pending: true
tag_identifier: service-two

- label: "Complete Deployment of Service Two"
key: "deployment:${ENVIRONMENT}:${REGION}:complete-deployment-service-two"
- rokt/tag-release#v1.0.0:
plugins:
- ROKT/tag-release#v1.0.3-beta:
mark_completed: true
tag_identifier: service-two
```
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
lint:
image: buildkite/plugin-linter
command: ['--id', 'ROKT/tag-release']
volumes:
- ".:/plugin:ro"
4 changes: 2 additions & 2 deletions hooks/post-command
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eo pipefail

basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

if [ "${BUILDKITE_PLUGIN_BUILDKITE_TAG_RELEASE_MARK_COMPLETED}" == "true" ]
if [ "${BUILDKITE_PLUGIN_TAG_RELEASE_MARK_COMPLETED}" == "true" ]
then
$basedir/lib/tag-release.sh "current" "pending" "previous" "${BUILDKITE_PLUGIN_BUILDKITE_TAG_RELEASE_TAG_IDENTIFIER}"
$basedir/lib/tag-release.sh "current" "pending" "previous" "${BUILDKITE_PLUGIN_TAG_RELEASE_TAG_IDENTIFIER}"
fi
4 changes: 2 additions & 2 deletions hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eo pipefail

basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"

if [ "${BUILDKITE_PLUGIN_BUILDKITE_TAG_RELEASE_MARK_PENDING}" == "true" ]
if [ "${BUILDKITE_PLUGIN_TAG_RELEASE_MARK_PENDING}" == "true" ]
then
$basedir/lib/tag-release.sh "pending" "" "" "${BUILDKITE_PLUGIN_BUILDKITE_TAG_RELEASE_TAG_IDENTIFIER}"
$basedir/lib/tag-release.sh "pending" "" "" "${BUILDKITE_PLUGIN_TAG_RELEASE_TAG_IDENTIFIER}"
fi
13 changes: 7 additions & 6 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "buildkite_tag_release"
name: Tag Release
description: Tag commits with release tag when deploying
author: https://github.com/ROKT
public: true
requirements:
- bash
Expand All @@ -12,9 +13,9 @@ configuration:
type: boolean # Should we mark the commit as current / previous
tag_identifier:
type: string # An identifier to include in the tag to distinguish deployment of different services within the same repository
oneOf:
- required:
- mark_pending
- required:
- mark_completed
oneOf:
- required:
- mark_pending
- required:
- mark_completed
additionalProperties: false

0 comments on commit 6fbae1a

Please sign in to comment.