Skip to content

Commit

Permalink
Deploy to test (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Jun 15, 2022
2 parents 288faac + ca7fdc9 commit b601047
Show file tree
Hide file tree
Showing 187 changed files with 6,884 additions and 2,419 deletions.
84 changes: 0 additions & 84 deletions .aws/ecs-task.json

This file was deleted.

10 changes: 0 additions & 10 deletions .aws/set-env.sh

This file was deleted.

2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = benefits/core/migrations/*
37 changes: 0 additions & 37 deletions .devcontainer/.env.sample

This file was deleted.

19 changes: 12 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ FROM benefits_client:latest

USER root

# install node.js
# see https://github.com/nodesource/distributions#installation-instructions

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash

RUN apt-get install -qq nodejs npm libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \
libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb curl git jq ssh
# install Linux CLI tools for development
RUN apt-get install -qq curl jq ssh

USER $USER

Expand All @@ -17,3 +12,13 @@ RUN python -m pip install --upgrade pip && \

COPY docs/requirements.txt docs/requirements.txt
RUN pip install -r docs/requirements.txt

COPY tests/pytest/requirements.txt tests/pytest/requirements.txt
RUN pip install -r tests/pytest/requirements.txt

# install pre-commit environments in throwaway Git repository
# https://stackoverflow.com/a/68758943
COPY .pre-commit-config.yaml .
RUN git init . && \
pre-commit install-hooks && \
rm -rf .git
44 changes: 11 additions & 33 deletions .devcontainer/compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: benefits
version: "3.8"

services:
Expand All @@ -6,58 +7,35 @@ services:
image: benefits_client:latest
env_file: .env
ports:
- "8000"
- "${DJANGO_LOCAL_PORT:-8000}:8000"
volumes:
- ../.aws/config:/home/calitp/app/config:ro
- ../fixtures:/home/calitp/app/fixtures:cached
- ../fixtures:/home/calitp/app/fixtures:ro

dev:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
image: benefits_client:dev
env_file: .env
entrypoint: []
command: sleep infinity
# https://code.visualstudio.com/docs/remote/create-dev-container#_use-docker-compose
entrypoint: sleep infinity
depends_on:
- server
ports:
- "8000"
- "${DJANGO_LOCAL_PORT:-8000}:8000"
volumes:
- ../:/home/calitp/app:cached
- ../:/home/calitp/app

docs:
image: benefits_client:dev
entrypoint: mkdocs
command: serve --dev-addr "0.0.0.0:8000"
command: serve --dev-addr "0.0.0.0:8001"
ports:
- "8000"
- "8001"
volumes:
- ../:/home/calitp/app:cached
- ../:/home/calitp/app

server:
image: ghcr.io/cal-itp/eligibility-server:main
image: ghcr.io/cal-itp/eligibility-server@sha256:337d5b2beb1e458980be49a778efd4a47f8daa8decc5e8329c0d528596e2f196
ports:
- "5000"

s3pull:
image: amazon/aws-cli
entrypoint: [ "/bin/sh" ]
command: [ "-c", "aws s3 sync s3://${AWS_BUCKET} ." ]
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
volumes:
- ../.aws/config:/aws

s3push:
image: amazon/aws-cli
entrypoint: [ "/bin/sh" ]
command: [ "-c", "aws s3 sync . s3://${AWS_BUCKET}" ]
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
volumes:
- ../.aws/config:/aws
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"extensions": [
"batisteo.vscode-django",
"eamodio.gitlens",
"mhutchie.git-graph",
"ms-python.python",
"ms-python.vscode-pylance",
"esbenp.prettier-vscode"
Expand Down
10 changes: 2 additions & 8 deletions .devcontainer/postAttach.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/env bash
set -eu

# initialize hook environments
pre-commit install --install-hooks --overwrite

# manage commit-msg hooks
pre-commit install --hook-type commit-msg

# install cypress
cd tests/cypress && npm install && npx cypress install
# initialize pre-commit
pre-commit install --overwrite
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.aws/
.devcontainer/
.git/
.github/
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# force LF for everyone
text eol=lf
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# default to benefits-admin team
* @cal-itp/benefits-admin
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Report a bug
labels: bug
---

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Desktop (please complete the following information)

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

## Smartphone (please complete the following information)

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

## Additional context

Add any other context about the problem here.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/deliverable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Deliverable
about: Create a task for a non-code deliverable (e.g. Google doc)
labels: deliverable
---

## Acceptance Criteria

- [ ]

## Additional context

<!-- Include information about scope, time frame, person who requested the task, links to resources -->

## What is the definition of done?
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Design issue
about: Create a task for the UI/UX team
labels: design
assignees: srhhnry, Indiajar
---
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/epic-decision-record.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Epic / Decision Record
about: A basic structure for epics
labels: epic
---

<!-- An epic represents a group of user stories/tasks on the roadmap, to be deployed together, as a part of a new feature set. -->

**Date**:
**Writers**:
**Status**:

## Background

<!-- [Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.] -->

## Decision drivers <!-- optional -->

<!-- - [driver 1, e.g., a force, facing concern, …]
- [driver 2, e.g., a force, facing concern, …] -->

## Considered options

<!-- - [option 1]
- [option 2] -->

## Decision outcome

<!-- Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)]. You may discuss positive and negative consequences of each option considered. -->

## Acceptance criteria

- [ ] Acceptance criteria

## Definition of Done

A clear and concise description of what "Done" means for this Epic.

## User Stories

- [ ] As a User Story, I want to be verifiable, so that this epic can be satisfied

## Tasks

- [ ] Code and non-code tasks that work towards a solution to to this epic

## Implementation Ready Checklist

- [ ] Acceptance criteria defined
- [ ] Team understands acceptance criteria
- [ ] Acceptance criteria is verifiable
- [ ] User workflows defined / designed
- [ ] External / 3rd Party dependencies identified

## Links, resources

- Other links here
Loading

0 comments on commit b601047

Please sign in to comment.