Skip to content

Commit

Permalink
chore: Merge master into with-doom (#14)
Browse files Browse the repository at this point in the history
* Update shipyard orb version on circleci config

The new version adds support for applications.

* feat: add `fetch-shipyard-env` gh workflow

Added new Github Action workflow to retrieve Shipyard's vars and print them

* use version 3.8, before --> init swap (#10)

* feat: Use new integrate-shipyard action (#11)

* chore: Update Makefile to Compose v2 (#13)

---------

Co-authored-by: Rogerio Shieh Barbosa <[email protected]>
Co-authored-by: Peter Valdez <[email protected]>
Co-authored-by: Akshay K <[email protected]>
Co-authored-by: Oscar Romero <[email protected]>
  • Loading branch information
5 people authored Feb 20, 2024
1 parent 82ad07f commit 26c4894
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '2.1'
orbs:
shipyard: shipyard/shipyard@3.0.0
shipyard: shipyard/shipyard@3.1.0
jobs:
print-env-data:
machine:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/print-env-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on: [push]

jobs:
print-env-data:
runs-on: ubuntu-latest
name: Fetch Shipyard Vars
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Integrate Shipyard
uses: shipyard/[email protected]
with:
api-token: ${{ secrets.SHIPYARD_API_TOKEN }}
timeout-minutes: "10"
- name: Print Env Data
run: |
export CYPRESS_BASE_URL=${SHIPYARD_ENVIRONMENT_URL}
export CYPRESS_BYPASS_TOKEN=${SHIPYARD_BYPASS_TOKEN}
env | grep -e SHIPYARD -e CYPRESS
shell: bash
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@ VOLUME=$(shell basename $(PWD))
develop: clean build migrations.upgrade run

clean:
docker-compose rm -vf
docker compose rm -vf

build:
docker-compose build
docker compose build

run:
docker-compose up
docker compose up

shell:
docker-compose run worker \
docker compose run worker \
sh

python-shell:
docker-compose run worker \
docker compose run worker \
poetry run flask shell

postgres.data.delete: clean
docker volume rm $(VOLUME)_postgres

postgres.start:
docker-compose up -d postgres
docker-compose exec postgres \
docker compose up -d postgres
docker compose exec postgres \
sh -c 'while ! nc -z postgres 5432; do sleep 0.1; done'

migrations.blank: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db revision

migrations.create: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db migrate

migrations.upgrade: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db upgrade

migrations.heads: postgres.start
docker-compose run worker \
docker compose run worker \
poetry run flask db heads
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: '3.8'

services:

Expand Down Expand Up @@ -28,7 +28,7 @@ services:

worker:
labels:
shipyard.before: 'poetry run flask db upgrade'
shipyard.init: 'poetry run flask db upgrade'
build: '.'
environment:
DATABASE_URL: 'postgres://obscure-user:obscure-password@postgres/app'
Expand Down

0 comments on commit 26c4894

Please sign in to comment.