Skip to content

Commit

Permalink
Migrate Jenkins example DAGs to new design apache#22451
Browse files Browse the repository at this point in the history
  • Loading branch information
chethanuk committed Jun 2, 2022
1 parent f294a26 commit cca9256
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
17 changes: 0 additions & 17 deletions airflow/providers/jenkins/example_dags/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-jenkins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Content
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/main/airflow/providers/jenkins/example_dags>
Example DAGs <https://github.com/apache/airflow/tree/main/tests/system/providers/jenkins>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-jenkins/>
Installing from sources <installing-providers-from-sources>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
from datetime import datetime

from requests import Request
Expand All @@ -25,9 +26,11 @@
from airflow.providers.jenkins.operators.jenkins_job_trigger import JenkinsJobTriggerOperator

JENKINS_CONNECTION_ID = "your_jenkins_connection"
ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "test_jenkins"

with DAG(
"test_jenkins",
DAG_ID,
default_args={
"retries": 1,
"concurrency": 8,
Expand Down Expand Up @@ -65,3 +68,9 @@ def grab_artifact_from_jenkins(url):

# Task dependency created via `XComArgs`:
# job_trigger >> grab_artifact_from_jenkins()


from tests.system.utils import get_test_run # noqa: E402

# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)

0 comments on commit cca9256

Please sign in to comment.