Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
one_jh
airflow-test-jh
Commits
d3c9aa1a
Commit
d3c9aa1a
authored
Jun 09, 2022
by
one_jh
Browse files
Update passfail.py
parent
7cceec8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
passfail.py
View file @
d3c9aa1a
...
...
@@ -22,27 +22,27 @@ dag = DAG(
start
=
DummyOperator
(
task_id
=
'run_this_first'
,
dag
=
dag
)
passing
=
KubernetesPodOperator
(
namespace
=
'default'
,
image
=
"Python:3.6"
,
cmds
=
[
"Python"
,
"-c"
],
arguments
=
[
"print('hello world')"
],
labels
=
{
"foo"
:
"bar"
},
name
=
"passing-test"
,
task_id
=
"passing-task"
,
get_logs
=
True
,
dag
=
dag
)
failing
=
KubernetesPodOperator
(
namespace
=
'default'
,
image
=
"ubuntu:1604"
,
cmds
=
[
"Python"
,
"-c"
],
arguments
=
[
"print('hello world')"
],
labels
=
{
"foo"
:
"bar"
},
name
=
"fail"
,
task_id
=
"failing-task"
,
get_logs
=
True
,
dag
=
dag
)
#
passing = KubernetesPodOperator(namespace='default',
#
image="Python:3.6",
#
cmds=["Python","-c"],
#
arguments=["print('hello world')"],
#
labels={"foo": "bar"},
#
name="passing-test",
#
task_id="passing-task",
#
get_logs=True,
#
dag=dag
#
)
#
failing = KubernetesPodOperator(namespace='default',
#
image="ubuntu:1604",
#
cmds=["Python","-c"],
#
arguments=["print('hello world')"],
#
labels={"foo": "bar"},
#
name="fail",
#
task_id="failing-task",
#
get_logs=True,
#
dag=dag
#
)
templated_command
=
"""
kubectl get pods
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment