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(wiki): add an introduction to creating jobs #45

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.DS_Store
1 change: 1 addition & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Please see the [CONTRIBUTING guide](../CONTRIBUTING.md) for additional informati
| [blender-ffmpeg](./v2023-09/job_templates/blender-ffmpeg.yaml) | step dependencies, embedded files, job parameters, ui metadata |
| [ffmpeg](./v2023-09/job_templates/ffmpeg.yaml) | command arguments, debugging environment, step dependencies, job parameters, ui metadata |
| [host-requirements](./v2023-09/job_templates/host-requirements.yaml) | host requirements |
| [path-mapping](./v2023-09/job_templates/path-mapping.yaml) | path mapping |
| [stdout-messages](./v2023-09/job_templates/stdout-messages.yaml) | stdout messages, embedded files |
| [ui-controls-showcase](./v2023-09/job_templates/ui-controls-showcase.yaml) | job parameters, ui metadata, embedded file |

Expand Down
43 changes: 43 additions & 0 deletions samples/v2023-09/job_templates/path-mapping.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# ----
# Demonstrates
# ----
# This demonstrates a simple job template that can be used to inspect the path mapping
# rules that are available to your jobs.
#
# To run:
# PATH_MAPPING_RULES="{\"version\":\"pathmapping-1.0\", \"path_mapping_rules\": [{\"source_path_format\": \"POSIX\", \"source_path\": \"/mnt/source_directory\", \"destination_path\": \"/mnt/destination_directory\"}]}"
# openjd run --step PrintRules path-mapping.yaml --path-mapping-rules "$PATH_MAPPING_RULES"
# openjd run --step PrintRules path-mapping.yaml
#
# ----
# Requirements
# ----
# - bash compatible shell
#
# -----
# Contributors to this template:
# Daniel Neilson (https://github.com/ddneilson)

name: ViewPathMappingFile
specificationVersion: jobtemplate-2023-09
steps:
- name: PrintRules
script:
actions:
onRun:
command: bash
args:
- "{{Task.File.Print}}"
embeddedFiles:
- name: Print
type: TEXT
data: |
#!/bin/bash

if test "{{Session.HasPathMappingRules}}" = "true"; then
cat {{Session.PathMappingRulesFile}}
else
echo "No path mapping rules defined for this Session"
fi
3 changes: 2 additions & 1 deletion wiki/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ on the second talk.
## Getting Started

The fastest way to understand the bones of Open Job Description is to understand both [How Jobs Are Constructed](How-Jobs-Are-Constructed)
and [How Jobs Are Run](How-Jobs-Are-Run). You may also find it beneficial to look through the provided
and [How Jobs Are Run](How-Jobs-Are-Run). Then, once you've given those a look through go through the
[Introduction to Creating a Job](Introduction-to-Creating-a-Job) and then browse the provided
ddneilson marked this conversation as resolved.
Show resolved Hide resolved
[sample templates](https://github.com/OpenJobDescription/openjd-specifications/tree/mainline/samples) in this GitHub
repository.

Expand Down
Loading