Skip to content

Commit

Permalink
Merge branch 'master' into cert
Browse files Browse the repository at this point in the history
  • Loading branch information
covesturtevant committed Dec 18, 2024
2 parents 3001498 + 04379bb commit 129f75d
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 69 deletions.
49 changes: 18 additions & 31 deletions .github/workflows/CERT_aepg600m_precipWeighing_update_dag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,19 @@ jobs:
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
outputs:
changed_file_list: ${{ steps.changed-files-list.outputs.changed_file_list }}
# Use this changed_file_list if you plan to use get-changed-files-action
changed_file_list: ${{ steps.changed-files-action.outputs.changed_file_list }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

# Using get-changed-files-action
- name: Get changed files action
id: changed-files-action
uses: ./.github/actions/get-changed-files

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.

- name: Make list of changed files
id: changed-files-list
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
file_list=""
for file in $ALL_CHANGED_FILES; do
if [ $file_list ]
then
file_list=$file_list,$file
else
file_list=$file
fi
echo "$file was changed"
done
echo "Full changed file list: $file_list"
echo "changed_file_list=$file_list" >> "$GITHUB_OUTPUT"
update-pipelines:
update_pipelines:
needs: changed_files
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
Expand All @@ -67,10 +50,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: ls -la

- uses: actions/setup-python@v3

- name: Update pipelines
uses: ./.github/actions/update-pipelines
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- run: pip install -r .github/workflow_scripts/update_dag_pipelines/requirements.txt
- run: python3 -u .github/workflow_scripts/update_dag_pipelines/update_dag_pipelines.py
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
paths: ${{ env.PATHS }}
transaction: ${{ env.TRANSACTION }}
update_scope: ${{ env.UPDATE_SCOPE }}
changed_files: ${{ env.CHANGED_FILES }}

17 changes: 11 additions & 6 deletions .github/workflows/CERT_aepg600m_site_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'pipe/aepg600m/site-list*.json'
workflow_dispatch: {} # Allows trigger of workflow from web interface
jobs:
put-file:
put_files:
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
env:
Expand All @@ -21,9 +21,14 @@ jobs:
- uses: actions/checkout@v4
- run: ls -la

- uses: actions/setup-python@v3
- name: Put file
uses: ./.github/actions/put-files
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- run: pip install -r .github/workflow_scripts/put_files/requirements.txt
- run: python3 -u .github/workflow_scripts/put_files/put_files.py
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
repo_name: ${{ env.REPO }}
branch_name: ${{ env.BRANCH }}
in_paths: ${{ env.IN_PATHS }}
out_paths: ${{ env.OUT_PATHS }}


49 changes: 18 additions & 31 deletions .github/workflows/DEV_aepg600m_precipWeighing_update_dag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,19 @@ jobs:
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
outputs:
changed_file_list: ${{ steps.changed-files-list.outputs.changed_file_list }}
# Use this changed_file_list if you plan to use get-changed-files-action
changed_file_list: ${{ steps.changed-files-action.outputs.changed_file_list }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

# Using get-changed-files-action
- name: Get changed files action
id: changed-files-action
uses: ./.github/actions/get-changed-files

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.

- name: Make list of changed files
id: changed-files-list
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
file_list=""
for file in $ALL_CHANGED_FILES; do
if [ $file_list ]
then
file_list=$file_list,$file
else
file_list=$file
fi
echo "$file was changed"
done
echo "Full changed file list: $file_list"
echo "changed_file_list=$file_list" >> "$GITHUB_OUTPUT"
update-pipelines:
update_pipelines:
needs: changed_files
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
Expand All @@ -67,10 +50,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: ls -la

- uses: actions/setup-python@v3

- name: Update pipelines
uses: ./.github/actions/update-pipelines
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
cache: 'pip'
- run: pip install -r .github/workflow_scripts/update_dag_pipelines/requirements.txt
- run: python3 -u .github/workflow_scripts/update_dag_pipelines/update_dag_pipelines.py
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
paths: ${{ env.PATHS }}
transaction: ${{ env.TRANSACTION }}
update_scope: ${{ env.UPDATE_SCOPE }}
changed_files: ${{ env.CHANGED_FILES }}

2 changes: 1 addition & 1 deletion .github/workflows/DEV_aepg600m_site_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'pipe/aepg600m/site-list*.json'
workflow_dispatch: {} # Allows trigger of workflow from web interface
jobs:
put-file:
put_files:
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
env:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/PROD_aepg600m_precipWeighing_update_dag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: PROD-aepg600m-precipWeighing-update-dag
on:
push:
branches:
- 'prod'
paths:
- 'pipe/aepg600m/*.yaml'
- 'pipe/aepg600m/pipe_list_aepg600m.txt'
- 'pipe/precipWeighing/*.yaml'
- 'pipe/precipWeighing/pipe_list_precipWeighing.txt'
workflow_dispatch: {} # Allows trigger of workflow from web interface

jobs:
# -------------------------------------------------------------
# Using GitHub's API is not supported for push events
# -------------------------------------------------------------
#
# ----------------------------------------------------------------------------------------------
# Using local .git history
# ----------------------------------------------------------------------------------------------
# Event `push`: Compare the preceding remote commit -> to the current commit of the main branch
# ----------------------------------------------------------------------------------------------

changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
outputs:
# Use this changed_file_list if you plan to use get-changed-files-action
changed_file_list: ${{ steps.changed-files-action.outputs.changed_file_list }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

# Using get-changed-files-action
- name: Get changed files action
id: changed-files-action
uses: ./.github/actions/get-changed-files

update_pipelines:
needs: changed_files
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
env:
PACHD_ADDRESS: grpcs://pachyderm-prod.transitions.gcp.neoninternal.org:443
PACH_TOKEN: ${{ secrets.RepoOwnerPachydermProd }}
PATHS: 'pipe/aepg600m,pipe/precipWeighing' # Separate multiple with comma (e.g. 'pipe/pqs1,pipe/parWaterSurface'). Order matters.
TRANSACTION: True
UPDATE_SCOPE: changed # 'all' or 'changed'. If not specified, all will be updated. 'changed' will update/create any changed/non-existent pipelines.
CHANGED_FILES: ${{needs.changed_files.outputs.changed_file_list}}
steps:
- uses: actions/checkout@v4
- run: ls -la

- name: Update pipelines
uses: ./.github/actions/update-pipelines
with:
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
paths: ${{ env.PATHS }}
transaction: ${{ env.TRANSACTION }}
update_scope: ${{ env.UPDATE_SCOPE }}
changed_files: ${{ env.CHANGED_FILES }}

34 changes: 34 additions & 0 deletions .github/workflows/PROD_aepg600m_site_list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PROD-aepg600m-site-list
on:
push:
branches:
- 'prod'
paths:
- 'pipe/aepg600m/site-list*.json'
workflow_dispatch: {} # Allows trigger of workflow from web interface
jobs:
put_files:
runs-on: arc-neon-gke
#runs-on: ubuntu-latest
env:
PACHD_ADDRESS: grpcs://pachyderm-prod.transitions.gcp.neoninternal.org:443
PACH_TOKEN: ${{ secrets.RepoOwnerPachydermProd }}
REPO: aepg600m_site_list # Pachyderm repo
BRANCH: master # Pachyderm branch
IN_PATHS: 'pipe/aepg600m/site-list-heated-kafka.json,pipe/aepg600m/site-list-nonheated-kafka.json,pipe/aepg600m/site-list-heated-trino.json,pipe/aepg600m/site-list-nonheated-trino.json' # Comma-separated list (no spaces) to one or more paths or directories. Length must match OUT_PATHS. If directory, all files in directory will be placed in pachyderm at corresponding entry of OUT_PATHS.
OUT_PATHS: 'site-list-heated-kafka.json,site-list-nonheated-kafka.json,site-list-heated-trino.json,site-list-nonheated-trino.json' # Comma-separated list (no spaces) of corresponding path(s) to place the files(s) in Pachyderm. Must be same length as IN_PATHS. If corresponding entry in IN_PATHS is a file, specify to the file. If corresponding entry in IN_PATHS is a directory, specify to the directory.
steps:
- uses: actions/checkout@v4
- run: ls -la

- name: Put file
uses: ./.github/actions/put-files
with:
pachd_address: ${{ env.PACHD_ADDRESS }}
pach_token: ${{ env.PACH_TOKEN }}
repo_name: ${{ env.REPO }}
branch_name: ${{ env.BRANCH }}
in_paths: ${{ env.IN_PATHS }}
out_paths: ${{ env.OUT_PATHS }}


0 comments on commit 129f75d

Please sign in to comment.