Skip to content

Commit 2315b38

Browse files
committed
Add release workflow
1 parent ebe2e0a commit 2315b38

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

.github/workflows/whirl-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ jobs:
77
deploy:
88
runs-on: ubuntu-latest
99
permissions:
10-
contents: write # for actions/upload-release-asset to upload release asset
10+
contents: write # for upload release asset
1111
steps:
1212
- uses: actions/checkout@v2
1313

1414
- name: Run git-archive command to create a release artifact
1515
run: git archive --format=tar.gz --prefix=whirl/ --output=whirl-release.tar.gz HEAD
1616

17-
- name: upload linux artifact
17+
- name: upload Whirl release artifact
1818
env:
1919
GITHUB_TOKEN: ${{ github.token }}
2020
run: |

README.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,18 @@ export PATH=<target directory of whirl>:${PATH}
4242

4343
### Use the release
4444

45-
Download the release artifact
45+
Download the [latest Whirl release artifact](https://github.com/godatadriven/whirl/releases/download/latest/whirl-release.tar.gz)
46+
47+
Extract the file (for example into `/usr/local/opt`)
48+
49+
```bash
50+
tar -xvzf whirl-release.tar.gz -C /usr/local/opt
51+
```
52+
53+
Make sure the whirl script is available on your path
54+
```bash
55+
export PATH=/usr/local/opt/whirl:$PATH
56+
```
4657

4758
## Usage
4859

@@ -57,18 +68,22 @@ $ whirl --help
5768

5869
#### Starting whirl
5970

60-
The default action is to start the DAG in your current directory. It expects an environment to be configured. You can pass this as a command line argument or you can configure it in a `.whirl.env` file. (See [Configuring environment variables](#configuring-environment-variables).) The environment refers to a directory with the same name in the `envs` directory located near the _whirl_ script.
71+
The default action is to start the DAG in your current directory.
72+
73+
With the `[-x example]` commandline argument you can run whirl from anywhere and tell whirl which example dag to run. The example refers to a directory with the same name in the `examples` directory located near the _whirl_ script.
74+
75+
Whirl expects an environment to be configured. You can pass this as a command line argument `[-e environment]` or you can configure it as environment variable `WHIRL_ENVIRONMENT` in a `.whirl.env` file. (See [Configuring environment variables](#configuring-environment-variables).) The environment refers to a directory with the same name in the `envs` directory located near the _whirl_ script.
6176

6277
```bash
63-
$ whirl [start] [-d <directory>] [-e <environment>]
78+
$ whirl [-x example] [-e <environment>] [start]
6479
```
6580

6681
Specifying the `start` command line argument is a more explicit way to start _whirl_.
6782

6883
#### Stopping whirl
6984

7085
```bash
71-
$ whirl stop [-d <directory>] [-e <environment>]
86+
$ whirl [-x example] [-e <environment>] stop
7287
```
7388
Stops the configured environment.
7489

@@ -140,8 +155,6 @@ Each example contains it's own README file to explain the specifics of that exam
140155

141156
#### Generic running of examples
142157

143-
From within the example directory the `whirl` command can be executed.
144-
145158
To run a example:
146159

147160
```bash
@@ -150,6 +163,13 @@ $ cd ./examples/<example-dag-directory>
150163
$ whirl -e <environment to use>
151164
```
152165

166+
or
167+
```bash
168+
$
169+
# Note: here we pass the whirl environment as a command-line argument. It can also be configured with the WHIRL_ENVIRONMENT variable
170+
$ whirl -x <example to run> -e <environment to use>
171+
```
172+
153173
Open your browser to [http://localhost:5000](http://localhost:5000) to access the Airflow UI. Manually enable the DAG and watch the pipeline run to successful completion.
154174

155175

whirl

+1
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ logs() {
347347
usage() {
348348
echo "usage: ${BASH_SOURCE[0]} [-h|--help] [-e|--environment env] [start|stop|ci]"
349349
echo " -h|--help display usage"
350+
echo " -x|--example example specify example to run"
350351
echo " -e|--environment environment specify environment to use"
351352
echo " -d|--directory environment_folder specify the folder that contains the environments (defaults to SCRIPT_DIR)"
352353
echo " -l|--logs servicename tail the logs of the service"

0 commit comments

Comments
 (0)