Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow specification of now --public in .drone.yml #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ pipeline:
+ scale: 2
```

Example configuration for specifying the `--public` argument for the `now` CLI.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this link for documentation : https://zeit.co/blog/now-public


```diff
pipeline:
now:
image: lucap/drone-now
deploy_name: deployment-name
secrets: [ now_token ]
- scale: 2
+ public: true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this public property to the Parameter Reference section

```

# Secret Reference

Expand Down Expand Up @@ -158,4 +169,4 @@ rules_file
: File that contain set of rules

scale
: Min and Max scaling values
: Min and Max scaling values
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ pipeline:
directory: public
alias: my.deployment.com
secrets: [ now_token ]
public: true
```
11 changes: 10 additions & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ set -e
NOW_DEPLOY_OPTIONS=" --no-clipboard"
NOW_AUTH=""

# Is this a public deployment?
if [ "$PLUGIN_PUBLIC" == "true" ]
then
echo "> adding option --public. If you are using an OSS plan, your source and logs will be public!"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not true. In any case with this public option, the source and logs will be public...

configuring public deployment. Your source and logs will be public!

NOW_DEPLOY_OPTIONS="${NOW_DEPLOY_OPTIONS} --public"
else
echo "> --public option not specified."
fi

# Get the token or error
if [ -z "$PLUGIN_NOW_TOKEN" ]
then
Expand Down Expand Up @@ -94,4 +103,4 @@ then
exit $rc
else
echo $'\n'"> Successfully deployed! $NOW_DEPLOYMENT_URL"$'\n'
fi
fi