Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Release v1.0.2 (#437)
Browse files Browse the repository at this point in the history
* Automatic Docker builds on tagged releases and PRs with multi-platform support

* Remove nightly action, which was merged into build

* Allow all files to be copied in

* Dex 761 social group site settings (#419)

* DEX-761 flesh out social group form except for multipleInGroup

* DEX-761 begin fleshing out the switch

* DEX-761 continue with fleshing out the switch

* DEX-761 add useEffect

* DEX-761 rename the role component, clean up, and remove the unnecessary useState

* DEX-761 internationalize and add description as caption

* DEX-761 respond to code review feedback

* DEX-761 remove unecessary flexbox div

* DEX-761 handle the case where a guidless role makes it into the SocialGroupRole component

* move server status components to siteStatus directory

* Change server status text to site status

* Add server status SuperText keys, prevent 'hide' prop from passing to Text

* Internationalize aria labels in site status components

* dex 1117 - Replace progress with pipeline_status in Asset Group (#420)

* Replace asset group progress with pipeline_status

* Change px to number and abstract showAlert in AssetGroup

* Add public AGS page (#416)

* Add public AGS page

* Remove unused property

* Fixes

* Rename things

* Remove unused translation key

* use new terms (#418)

* begin release procedure (#424)

* begin release procedure

* clarify about merge conflicts

* respond to feedback

* respond to code review feedback

* Update release procedure doc

* Run on sentence

Co-authored-by: Ben Scheiner <[email protected]>

* DEX-922 implement stickyHeader and add a meaningful maxHeight to ever… (#430)

* DEX-922 implement stickyHeader and add a meaningful maxHeight to every DataDisplay. Also add horizontalScroll

* DEX-922 remove seemingly unnecessary horizontal scroll prop

* DEX-922 respond to code review feedback. Remove default maxHeight for Card component and replaced with optional styles, which was then implemented for ImageCard and StatusCard. Remove maxHeight from Card in relationshipCard, remove unused paperStyles from DataDisplay.

* DEX-922 respond to code review feedback pt 2

* DEX-922 add tableContainerStyles to DataDisplay and remove maxHeight

* DEX-922 remove tableContainerStyles from SightingsDisplay and fix a few little things

* DEX-922 final little fixes

* Compute new form state from previous state in Settings (#433)

* 922 follow up (#435)

* DEX-922 print the collaboration data to make the stackBlitz question easier

* DEX-922 I do not understand why tableData was undefined, but cool, codex, I can play this game with you

* DEX-922 try disablePortal

* DEX-922 change the z-index

* DEX-922 clean up

* DEX-922 respond to code review feedback

* Update version to 1.0.2 (#436)

Co-authored-by: Jason Parham <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: Ben Scheiner <[email protected]>
  • Loading branch information
4 people authored Jul 29, 2022
1 parent 895c0fb commit cab8412
Show file tree
Hide file tree
Showing 58 changed files with 908 additions and 298 deletions.
19 changes: 19 additions & 0 deletions .dockerfiles/www/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;
listen [::]:80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
167 changes: 154 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: Build

on:
schedule:
- cron: '0 0 * * *' # Every day at midnight
push:
pull_request:
paths:
- '.github/workflows/build.yml'
# Build when a fundamental package change has occured
- 'package.json'
branches:
- main
- develop
push:
branches:
- main
- develop
tags:
- v*
schedule:
- cron: '0 16 * * *' # Every day at 16:00 UTC (~09:00 PT)

jobs:
build:
name: Build the frontend releasable package
name: Build releasable package
runs-on: ubuntu-latest

steps:
Expand All @@ -22,11 +27,8 @@ jobs:
with:
node-version: '15.x'

- name: Install dependencies
run: npm install --legacy-peer-deps

- name: Compile build
run: npm run build -- --env=houston=relative
- name: Install dependencies and compile
run: ./scripts/build.npm.sh

- name: Package the build
run: |
Expand All @@ -39,3 +41,142 @@ jobs:
path: codex-frontend.tar.gz
# default:
# retention-days: 90

deploy:
name: Docker image build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
if: github.event_name == 'schedule'
with:
ref: develop

- uses: actions/checkout@v2
if: github.event_name != 'schedule'

- uses: docker/setup-qemu-action@v1
name: Set up QEMU
id: qemu
with:
image: tonistiigi/binfmt:latest
platforms: all

- uses: docker/setup-buildx-action@v1
name: Set up Docker Buildx
id: buildx

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

# Build images
- name: Build Codex
run: |
./scripts/buildx.docker.sh
# Log into container registries
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: wildmebot
password: ${{ secrets.WBIA_WILDMEBOT_DOCKER_HUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

# Push tagged image (version tag + latest) to registries
- name: Tagged Docker Hub
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
run: |
VERSION=$(echo ${GITHUB_REF} | sed 's#.*/v##')
./scripts/buildx.docker.sh -t ${VERSION}
./scripts/buildx.docker.sh -t latest
- name: Tagged GHCR
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
run: |
VERSION=$(echo ${GITHUB_REF} | sed 's#.*/v##')
./scripts/buildx.docker.sh -t ${VERSION} -r ghcr.io/wildmeorg/codex-frontend
./scripts/buildx.docker.sh -t latest -r ghcr.io/wildmeorg/codex-frontend
# Push stable image (main tag) to registries
- name: Stable Docker Hub
if: github.ref == 'refs/heads/main'
run: |
./scripts/buildx.docker.sh -t main
- name: Stable GHCR
if: github.ref == 'refs/heads/main'
run: |
./scripts/buildx.docker.sh -t main -r ghcr.io/wildmeorg/codex-frontend
# Push bleeding-edge image (develop tag) to registries
- name: Bleeding Edge Docker Hub
if: github.ref == 'refs/heads/develop'
run: |
./scripts/buildx.docker.sh -t develop
- name: Bleeding Edge GHCR
if: github.ref == 'refs/heads/develop'
run: |
./scripts/buildx.docker.sh -t develop -r ghcr.io/wildmeorg/codex-frontend
# Push nightly image (nightly tag) to registries
- name: Nightly Docker Hub
if: github.event_name == 'schedule'
run: |
./scripts/buildx.docker.sh -t nightly
- name: Nightly GHCR
if: github.event_name == 'schedule'
run: |
./scripts/buildx.docker.sh -t nightly -r ghcr.io/wildmeorg/codex-frontend
# Notify status in Slack
- name: Slack Notification
if: ${{ failure() && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') }}
uses: rtCamp/action-slack-notify@master
env:
SLACK_CHANNEL: dev-houston
SLACK_COLOR: '#FF0000'
SLACK_ICON: https://avatars.slack-edge.com/2020-03-02/965719891842_db87aa21ccb61076f236_44.png
SLACK_MESSAGE: 'Tagged / Latest Docker build of Codex Frontend failed :sob:'
SLACK_USERNAME: "GitHub CI"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Slack Notification
if: ${{ failure() && github.ref == 'refs/heads/main' }}
uses: rtCamp/action-slack-notify@master
env:
SLACK_CHANNEL: dev-houston
SLACK_COLOR: '#FF0000'
SLACK_ICON: https://avatars.slack-edge.com/2020-03-02/965719891842_db87aa21ccb61076f236_44.png
SLACK_MESSAGE: 'Stable Docker build of Codex Frontend failed :sob:'
SLACK_USERNAME: "GitHub CI"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Slack Notification
if: ${{ failure() && github.ref == 'refs/heads/develop' }}
uses: rtCamp/action-slack-notify@master
env:
SLACK_CHANNEL: dev-houston
SLACK_COLOR: '#FF0000'
SLACK_ICON: https://avatars.slack-edge.com/2020-03-02/965719891842_db87aa21ccb61076f236_44.png
SLACK_MESSAGE: 'Bleeding Edge Docker build of Codex Frontend failed :sob:'
SLACK_USERNAME: "GitHub CI"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

- name: Slack Notification
if: ${{ failure() && github.event_name == 'schedule' }}
uses: rtCamp/action-slack-notify@master
env:
SLACK_CHANNEL: dev-houston
SLACK_COLOR: '#FF0000'
SLACK_ICON: https://avatars.slack-edge.com/2020-03-02/965719891842_db87aa21ccb61076f236_44.png
SLACK_MESSAGE: 'Nightly Docker build of Codex Frontend failed :sob:'
SLACK_USERNAME: "GitHub CI"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
49 changes: 0 additions & 49 deletions .github/workflows/nightly.yml

This file was deleted.

15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:lts as org.wildme.codex.frontend.build

COPY . /code

WORKDIR /code

RUN set -ex \
&& ./scripts/build.npm.sh

##########################################################################################
FROM nginx:alpine as org.wildme.codex.frontend.deploy

COPY --from=org.wildme.codex.frontend.build /code/dist /usr/share/nginx/html

COPY ./.dockerfiles/www/default.conf /etc/nginx/conf.d/default.conf
22 changes: 13 additions & 9 deletions docs/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,37 @@ This document covers the conventions and paradigms used in this codebase. We gen

## Components

We rely heavily on Material UI. When a component exists in Material UI, use it instead of creating one by hand.
We rely heavily on Material UI. When a component exists in Material UI, use it instead of creating one by hand.

## Styles
## Styles

- Currently we use inline styles. The plan is to continue doing so until performance issues arise.
- Currently we use inline styles. The plan is to continue doing so until performance issues arise.
- We use a 4px grid system. All padding, margins, and widths should be divisible by 4.
- When using the main theme colors (white, black, or purple), please use Material UI's useTheme hook.

## Global state
## Global state

There are a few things stored in context, but mostly pages fetch their own data.

## Translations
## Translations

All displayed text must support translation - for this we use `react-intl`. Translation keys are verbatum English abbreviations of the displayed text in all caps. You can see some examples in `/locale/en.json`.
All displayed text must support translation - for this we use `react-intl`. Translation keys are verbatum English abbreviations of the displayed text in all caps. You can see some examples in `/locale/en.json`.

If you want to help translate the project, that is very much appreciated and needed, but please don't do it by manually editing files in `/locale`. Your changes will wind up getting overwritten by Lokalise.

## Conventions
## Conventions

- Any file with a React component should have the suffix `.jsx`
- Data fetching goes in `/src/models`
- Code specific to a certain page goes in `/src/pages`
- Components that are reused widely go in `/src/components`
- Post any questions in Github issues or send an email to [email protected]
- Post any questions in Github issues or send an email to [email protected]
- Thanks for contributing =)

## Release procedure

Please refer to [this document](https://github.com/WildMeOrg/codex-frontend/blob/develop/docs/release-procedure.md) for guidelines on making a new release.

## Making a hotfix

Likely you wont need to make a hotfix unless you are a Wild Me employee, but if the need arises please follow the [hotfix procedures](https://github.com/WildMeOrg/codex-frontend/blob/develop/docs/hotfix-procedure.md).
Likely you won't need to make a hotfix unless you are a Wild Me employee, but if the need arises please follow the [hotfix procedures](https://github.com/WildMeOrg/codex-frontend/blob/develop/docs/hotfix-procedure.md).
33 changes: 33 additions & 0 deletions docs/release-procedure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Release procedure

## Alert the team

A release PR should not happen while there are remaining work items in QA.

Consult the front-end team if there are still items in QA, or if other previous merges need to be omitted from the release.

The develop branch should be "frozen" during the release procedure; please be sure that everyone on the team is notified of the freeze and when it is completed.

## Merge and create the PR

First, resolve any potential merge conflicts with main on the develop branch

1. `git checkout develop`
2. `git pull origin develop`
3. `git checkout main`
4. `git pull origin main`
5. `git merge develop` (there should be no merge conflicts)
6. Update the version in package.json.

Then, issue a pull request for merging the develop branch into the main branch. Await approval and then merge using the "squash and merge" method.

Note: if you encounter merge conflicts when merging develop into main, something went wrong. Investigate what happened thoroughly before continuing.

## Draft a new release

After completion of the previous steps, draft a new release of the main branch on GitHub:

1. Navigate to [https://github.com/WildMeOrg/codex-frontend/releases/new](https://github.com/WildMeOrg/codex-frontend/releases/new).
2. Designate the target as the main branch.
3. Create a new tag following the SemVer pattern outlined [here](https://semver.org/) (vX.Y.Z). Note that this exact pattern (no period between v and the first name, for instance) must be followed explicitly. The release title should be the same as the tag. You can leave the release description blank.
4. Publish the release.
Loading

0 comments on commit cab8412

Please sign in to comment.