diff --git a/default_steps/step.bash.download_file.json b/default_steps/step.bash.download_file.json new file mode 100644 index 0000000..47ccebd --- /dev/null +++ b/default_steps/step.bash.download_file.json @@ -0,0 +1,16 @@ +{ + "kind": "vantage.step/v1", + "name": "Download File (Linux)", + "description": "Download a file over HTTP to a local path", + "interpreter": "bash", + "script": "out=$(mktemp -p ./)\necho \"Downloading file from $url\"\nwget -q $url -O $out\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"failed to download file from url\"\n exit 1\nfi\necho \"FILE_PATH=$out\" \u003e\u003e $WORKFLOW_ENV", + "declared_outputs": ["FILE_PATH"], + "declared_inputs": [ + { + "name": "url", + "default": "", + "description": "" + } + ], + "secret_refs": [] +} diff --git a/default_steps/step.bash.get_hostname.json b/default_steps/step.bash.get_hostname.json index 1a4dcd3..6359610 100644 --- a/default_steps/step.bash.get_hostname.json +++ b/default_steps/step.bash.get_hostname.json @@ -1,12 +1,10 @@ { - "kind": "vantage.step/v1", - "name": "Get Host Name", - "description": "", - "interpreter": "bash", - "script": "HOSTNAME=$(hostname)\necho $HOSTNAME\necho \"HOSTNAME=$HOSTNAME\" \u003e\u003e $WORKFLOW_ENV", - "declared_outputs": [ - "HOSTNAME" - ], - "declared_inputs": [], - "secret_refs": [] -} \ No newline at end of file + "kind": "vantage.step/v1", + "name": "Get Host Name", + "description": "Gets the agents hostname", + "interpreter": "bash", + "script": "HOSTNAME=$(hostname)\necho $HOSTNAME\necho \"HOSTNAME=$HOSTNAME\" \u003e\u003e $WORKFLOW_ENV", + "declared_outputs": ["HOSTNAME"], + "declared_inputs": [], + "secret_refs": [] +} diff --git a/default_steps/step.bash.list_directory.json b/default_steps/step.bash.list_directory.json index 8e524f1..9127cec 100644 --- a/default_steps/step.bash.list_directory.json +++ b/default_steps/step.bash.list_directory.json @@ -1,16 +1,16 @@ { - "kind": "vantage.step/v1", - "name": "List Directory", - "description": "", - "interpreter": "bash", - "script": "if [ ! -e $path ]; then\n echo \"file or directory doesn't exist: $path\"\n exit 1\nfi\nls -l $path", - "declared_outputs": [], - "declared_inputs": [ - { - "name": "path", - "default": "./", - "description": "" - } - ], - "secret_refs": [] -} \ No newline at end of file + "kind": "vantage.step/v1", + "name": "List Directory", + "description": "Lists the files in the specified path", + "interpreter": "bash", + "script": "if [ ! -e $path ]; then\n echo \"file or directory doesn't exist: $path\"\n exit 1\nfi\nls -l $path", + "declared_outputs": [], + "declared_inputs": [ + { + "name": "path", + "default": "./", + "description": "" + } + ], + "secret_refs": [] +} diff --git a/default_steps/step.bash.start_linx_service.json b/default_steps/step.bash.start_linx_service.json index 0bbb1c7..d8afbac 100644 --- a/default_steps/step.bash.start_linx_service.json +++ b/default_steps/step.bash.start_linx_service.json @@ -1,7 +1,7 @@ { "kind": "vantage.step/v1", "name": "Start Linux Service", - "description": "", + "description": "Start a linux systemd service", "interpreter": "bash", "script": "echo \"starting service $serviceName\"\nsystemctl start $serviceName\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"failed to start service\"\n exit 1\nfi", "declared_outputs": [], diff --git a/default_steps/step.bash.stop_linux_service.json b/default_steps/step.bash.stop_linux_service.json index f38e90b..c6a6aec 100644 --- a/default_steps/step.bash.stop_linux_service.json +++ b/default_steps/step.bash.stop_linux_service.json @@ -1,16 +1,16 @@ { - "kind": "vantage.step/v1", - "name": "Stop Linux Service", - "description": "", - "interpreter": "bash", - "script": "echo \"stopping service $serviceName\"\nsystemctl stop $serviceName\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"failed to stop service\"\n exit 1\nfi", - "declared_outputs": [], - "declared_inputs": [ - { - "name": "serviceName", - "default": "", - "description": "" - } - ], - "secret_refs": [] -} \ No newline at end of file + "kind": "vantage.step/v1", + "name": "Stop Linux Service", + "description": "Stops a linux systemd service", + "interpreter": "bash", + "script": "echo \"stopping service $serviceName\"\nsystemctl stop $serviceName\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"failed to stop service\"\n exit 1\nfi", + "declared_outputs": [], + "declared_inputs": [ + { + "name": "serviceName", + "default": "", + "description": "" + } + ], + "secret_refs": [] +} diff --git a/default_steps/step.bash.wget.json b/default_steps/step.bash.wget.json deleted file mode 100644 index 475d62e..0000000 --- a/default_steps/step.bash.wget.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "kind": "vantage.step/v1", - "name": "WGET", - "description": "", - "interpreter": "bash", - "script": "out=$(mktemp -p ./)\necho \"Downloading file from $url\"\nwget -q $url -O $out\nretVal=$?\nif [ $retVal -ne 0 ]; then\n echo \"failed to download file from url\"\n exit 1\nfi\necho \"FILE_PATH=$out\" \u003e\u003e $WORKFLOW_ENV", - "declared_outputs": [ - "FILE_PATH" - ], - "declared_inputs": [ - { - "name": "url", - "default": "", - "description": "" - } - ], - "secret_refs": [] -} \ No newline at end of file