Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(run.py): fixing error when runspace is provided #54

Merged
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
55 changes: 54 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,61 @@ jobs:
steps:
-
name: Release Please Action
id: release
id: release-please
uses: googleapis/[email protected]
with:
release-type: python
manifest-file: .release-please-manifest.json
-
name: Checkout buckets code
if: ${{ steps.release-please.outputs.release_created }}
uses: actions/checkout@v3
with:
fetch-depth: 1
-
name: Create release tags
id: metadata
if: ${{ steps.release-please.outputs.release_created }}
run: |
echo "Creating release tags for docker image"
IMAGE="chimefrb/workflow"
TAG=${{ steps.release-please.outputs.tag_name }}
echo "image=${IMAGE}:latest" >> $GITHUB_OUTPUT
echo "tagged_image=${IMAGE}:${TAG}" >> $GITHUB_OUTPUT
-
name: Setup ssh-agent
id: ssh-agent-setup
if: ${{ steps.release-please.outputs.release_created }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.CHIMEFRB_BOT_SSH_PRIVATE_KEY }}
-
name: Setup docker-buildx
id: buildx
if: ${{ steps.release-please.outputs.release_created }}
uses: docker/setup-buildx-action@v1
with:
install: true
-
name: Perform docker-login
if: ${{ steps.release-please.outputs.release_created }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build & Push docker image
id: build
if: ${{ steps.release-please.outputs.release_created }}
uses: docker/build-push-action@v2
with:
context: .
target: production
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
${{ steps.metadata.outputs.image }}
${{ steps.metadata.outputs.tagged_image }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ jobs:
name: Install dependencies
run: |
poetry install --all-extras
-
name: Setup Workflow Workspace
run: |
poetry run workflow workspace set development
-
name: Run workflow tests
run: |
poetry run workflow workspace set development
poetry run pytest --cov workflow/ --cov-report=lcov -s -v
-
name: Upload coverage report
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
".": "0.8.2",
".": "0.9.0",
"packages": {
".": {
"extra-files": [
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.9.0](https://github.com/CHIMEFRB/workflow/compare/v0.8.2...v0.9.0) (2024-06-12)


### Features

* **github-actions:** added deployment action to publish docker containers ([1c5d71c](https://github.com/CHIMEFRB/workflow/commit/1c5d71c5cbe79147c4ab0f3d76e6a21e71aa7042))
* **results:** added workflow results API & CLI ([0d20eaf](https://github.com/CHIMEFRB/workflow/commit/0d20eafb5a4969af69b488c6458393de79123210))
* **workflow:** updates to tests, and general api cleanup ([644a744](https://github.com/CHIMEFRB/workflow/commit/644a744bea3173afb629c3dc1e7ad20c7325d645))


### Bug Fixes

* **dockerfile:** fixes ([cdf4004](https://github.com/CHIMEFRB/workflow/commit/cdf40048733ee44de83fbf83b1049159209ce254))
* **github-actions:** added debug ssh session ([bce85d6](https://github.com/CHIMEFRB/workflow/commit/bce85d653ecba20ca71e219df3bc29e4d440a3b3))

## [0.8.2](https://github.com/CHIMEFRB/workflow/compare/v0.8.1...v0.8.2) (2024-06-07)


Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Build Command
# export DOCKER_BUILDKIT=1; docker buildx build -t chimefrb/workflow:latest .

ARG PYTHON_VERSION=3.8
ARG PYTHON_VERSION=3.10

FROM python:${PYTHON_VERSION}-slim as base

Expand Down Expand Up @@ -60,7 +60,7 @@ COPY . $PYSETUP_PATH
WORKDIR $PYSETUP_PATH
# Install Project Dependencies
RUN set -ex \
&& poetry install --without dev --without docs --no-interaction --no-ansi --no-cache -v
&& poetry install --without dev --no-interaction --no-ansi --no-cache -v

# Final Image
FROM base as production
Expand Down
114 changes: 0 additions & 114 deletions docker-compose-dev.yml

This file was deleted.

28 changes: 5 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
managers:
image: chimefrb/pipelines:latest
container_name: managers
command: python -m managers.server
command: ["/bin/bash", "-c", "touch /etc/site.yml && python -m managers.server"]
ports:
- "8002:8002"
environment:
Expand All @@ -46,10 +46,12 @@ services:
- SANIC_UPDATE_INTERVAL_SECONDS=40
- SANIC_SLEEP_INTERVAL_SECONDS=30
- SANIC_PURGE_TIME_SECONDS=3600
- SANIC_SITE_CONFIG_FILEPATH=/etc/site.yml
- DOCKER_HOST=unix:///var/run/docker.sock # Replace with production address or dind
- TZ=Etc/UTC
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./tests/workflow-site.yml:/etc/site.yml
networks:
- workflow
healthcheck:
Expand All @@ -68,7 +70,7 @@ services:
buckets:
image: chimefrb/buckets:latest
container_name: buckets
command: [ "/bin/bash", "-c", "python -m buckets.server" ]
command: [ "/bin/bash", "-c", "workflow workspace set development && python -m buckets.server" ]
expose:
- 8004
ports:
Expand All @@ -88,7 +90,7 @@ services:
results:
image: chimefrb/results:latest
container_name: results
command: [ "/bin/bash", "-c", "python -m results.server" ]
command: [ "/bin/bash", "-c", "workflow workspace set development && python -m results.server" ]
expose:
- 8005
ports:
Expand All @@ -114,26 +116,6 @@ services:
networks:
- workflow

local:
image: docker:dind
container_name: local
command:
- "/bin/sh"
- "-c"
- |
dockerd -H tcp://0.0.0.0:4444 --tls=false \
& while(! docker -H tcp://0.0.0.0:4444 info >/dev/null 2>&1); \
do sleep 1; \
done \
&& docker -H tcp://0.0.0.0:4444 swarm init && tail -f /dev/null
ports:
- "4444:4444"
expose:
- 4444
privileged: true
networks:
- workflow

networks:
workflow:
driver: bridge
44 changes: 0 additions & 44 deletions pipeline-example.yaml

This file was deleted.

Loading
Loading