Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 29 additions & 0 deletions .github/workflows/bounce.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PR Bouncer

on:
pull_request:
types: [opened, edited, reopened, synchronize] # Trigger on various pull request events

jobs:
check-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4 # Use a recent version
- name: Check for external changes
run: |
# Set the allowed directory
ALLOWED_DIR="uvasds-services/templates/ds2002"
# Get the list of changed files
CHANGED_FILES=$(git diff --name-only --relative HEAD^ HEAD)
# Check if any of the changed files are outside the allowed directory
if [[ $(echo "$CHANGED_FILES" | grep -q "^$ALLOWED_DIR/") ]] ; then
# No changes outside the allowed directory
echo "All changes within allowed directory"
exit 0
else
# Changes outside the allowed directory
echo "Changes outside the allowed directory detected"
echo "Pull request rejected."
exit 1
fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A repository for container Services managed by UVA School of Data Science.
Deployments follow the Helm structure, containing `Charts.yaml` and optional `values.yaml` in the root directory,
followed by `templates/` which in turn contains one or more deployments.

Standard deployments that include web access will tend to contain at least three files (which can be separate files or concatenated with `---` between stanzas):
Standard deployments that include web access will tend to contain at least three files (which can be separate files or concatenated with `---` between stanzas into a single file):

- `deployment.yaml` - Describes the container, replicas, `env` variables, resource allocations, etc.
- `nginx-ingress.yaml` - Describes the ingress rules, routing, FQDN mappings, and possible TLS secrets for HTTPS.
Expand Down
27 changes: 27 additions & 0 deletions uvasds-services/templates/ds2002/nem2p.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: nem2p-job
namespace: uvasds-services
spec:
schedule: "0-59/5 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: nem2p-job-container
image: ghcr.io/uvasds-systems/docker-iss:latest
imagePullPolicy: Always
envFrom:
- secretRef:
name: ds2002-mongo
resources:
limits:
cpu: "0.25"
memory: 512Mi
requests:
cpu: "0.1"
memory: 256Mi
restartPolicy: Never
ttlSecondsAfterFinished: 86400
27 changes: 27 additions & 0 deletions uvasds-services/templates/jobs/nem2p-disallow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: nem2p-job
namespace: uvasds-services
spec:
schedule: "0-59/5 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: nem2p-job-container
image: ghcr.io/uvasds-systems/docker-iss:latest
imagePullPolicy: Always
envFrom:
- secretRef:
name: ds2002-mongo
resources:
limits:
cpu: "0.25"
memory: 512Mi
requests:
cpu: "0.1"
memory: 256Mi
restartPolicy: Never
ttlSecondsAfterFinished: 86400
Loading