Skip to content

Commit

Permalink
Merge pull request #6033 from berkeley-dsep-infra/staging
Browse files Browse the repository at this point in the history
merging 6029/6030/6031 to prod
  • Loading branch information
shaneknapp authored Aug 28, 2024
2 parents c62fc2c + bbec296 commit 9d213ef
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-all-hubs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
fi
done
echo "Pretending to deploy base hub image to ${deployment} :P"
echo "hubploy deploy --debug ${deployment} hub staging"
echo "hubploy deploy --verbose ${deployment} hub staging"
done < <(ls deployments/ | sed -e 's,/,,g')
deploy-hub-images-prod:
Expand Down Expand Up @@ -185,5 +185,5 @@ jobs:
fi
done
echo "Pretending to deploy base hub image to ${deployment} :P"
echo "hubploy deploy --debug ${deployment} hub prod"
echo "hubploy deploy --verbose ${deployment} hub prod"
done < <(ls deployments/ | sed -e 's,/,,g')
23 changes: 12 additions & 11 deletions .github/workflows/deploy-hubs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
# deploy any hubs that have been labeled for deployment
for label in $(echo -e "${{ steps.pr-labels.outputs.labels }}"); do
if [[ "$label" == hub-* ]]; then
label=$(echo $label | awk -F'-' '{print $2}')
HUBS+="$label"
hub_name=$(echo $label | awk -F'-' '{print $2}')
HUBS+="$hub_name "
echo "DEPLOY=1" >> $GITHUB_ENV
fi
done
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
run: |
for hub in $(echo -e "${{ env.DEPLOY_HUBS }}"); do
echo "Deploying $hub to staging"
echo "hubploy --debug deploy $hub hub staging"
echo "hubploy --verbose deploy $hub hub staging"
done
deploy-hubs-to-prod:
Expand All @@ -119,11 +119,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check out the image repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Pull out any hubs that need deploying from the labels on the merge commit to prod
run: |
echo "PR labels: ${{ steps.pr-labels.outputs.labels }}"
Expand All @@ -137,14 +132,20 @@ jobs:
# deploy any hubs that have been labeled for deployment
for label in $(echo -e "${{ steps.pr-labels.outputs.labels }}"); do
if [[ "$label" == hub-* ]]; then
label=$(echo $label | awk -F'-' '{print $2}')
HUBS+="$label"
hub_name=$(echo $label | awk -F'-' '{print $2}')
HUBS+="$hub_name "
echo "DEPLOY=1" >> $GITHUB_ENV
fi
done
echo "DEPLOY_HUBS=${HUBS[@]}" >> $GITHUB_ENV
fi
- name: Check out the image repo
if: ${{ env.DEPLOY }}
uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Setup python
if: ${{ env.DEPLOY }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -200,5 +201,5 @@ jobs:
run: |
for hub in $(echo -e "${{ env.DEPLOY_HUBS }}"); do
echo "Deploying $hub to prod"
echo "hubploy --debug deploy $hub hub prod"
echo "hubploy --verbose deploy $hub hub prod"
done
15 changes: 15 additions & 0 deletions deployments/data101/config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ jupyterhub:
# # this role will be assigned to...
# groups:
# - course::N::group::Admins

# Data 101, Fall 2024, #https://jira-secure.berkeley.edu/browse/DH-364
course-staff-1536858:
# description: Enable course staff to view and access servers.
# this role provides permissions to...
scopes:
- admin-ui
- list:users!group=course::1536858
- admin:servers!group=course::1536858
- access:servers!group=course::1536858
# this role will be assigned to...
groups:
- course::1536858::enrollment_type::teacher
- course::1536858::enrollment_type::ta

extraConfig:
data101-new-db: |
from jupyterhub.utils import exponential_backoff
Expand Down
14 changes: 7 additions & 7 deletions deployments/publichealth/config/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ jupyterhub:
groups:
- course::1524699::group::all-admins

# PHW 142, Fall 2024, #5831
course-staff-1535789:
# PHW 142, Fall 2024, #https://github.com/berkeley-dsep-infra/datahub/issues/6026
course-staff-1537782:
# description: Enable course staff to view and access servers.
# this role provides permissions to...
scopes:
- admin-ui
- list:users!group=course::1535789
- admin:servers!group=course::1535789
- access:servers!group=course::1535789
- list:users!group=course::1537782
- admin:servers!group=course::1537782
- access:servers!group=course::1537782
# this role will be assigned to...
groups:
- course::1535789::enrollment_type::teacher
- course::1535789::enrollment_type::ta
- course::1537782::enrollment_type::teacher
- course::1537782::enrollment_type::ta

extraConfig:
# Use 1x-<title> in `common.yaml` extraConfig values.
Expand Down

0 comments on commit 9d213ef

Please sign in to comment.