Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #116 from guzman-raphael/main
Browse files Browse the repository at this point in the history
Restructure CI and add DevContainer build automation
  • Loading branch information
kabilar committed May 19, 2023
2 parents 482f203 + fad3f36 commit dcb7b39
Show file tree
Hide file tree
Showing 23 changed files with 41 additions and 250 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN \
usermod -aG docker vscode && \
apt-get clean

COPY ./requirements_dev.txt /tmp/
RUN \
# dev setup
apt update && \
Expand All @@ -22,6 +23,8 @@ RUN \
pip install --no-cache-dir --upgrade black pip && \
echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \
echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \
pip install --no-cache-dir -r /tmp/requirements_dev.txt && \
rm /tmp/requirements_dev.txt && \
# dircolors -b >> /home/vscode/.bashrc && \ # somehow fix colors
apt-get clean
COPY ./requirements.txt /tmp/
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Tutorial environment",
"name": "Environment + Data",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
Expand All @@ -9,17 +9,17 @@
"onCreateCommand": "mkdir -p ${IMAGING_ROOT_DATA_DIR} && pip install -e . && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait",
"postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${IMAGING_ROOT_DATA_DIR} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1",
"hostRequirements": {
"cpus": 2,
"cpus": 4,
"memory": "16gb",
"storage": "32gb"
},
"forwardPorts": [
3306
],
"customizations": {
"customizations": {
"settings": {
"python.pythonPath": "/usr/local/bin/python"
},
},
"vscode": {
"extensions": [
"ms-python.python",
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:
app:
extends:
file: ./local-data/docker-compose.yaml
file: ./local/docker-compose.yaml
service: app
environment:
- DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-calcium-imaging-data-v2
Expand Down
30 changes: 0 additions & 30 deletions .devcontainer/local-test/devcontainer.json

This file was deleted.

15 changes: 0 additions & 15 deletions .devcontainer/local-test/docker-compose.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Dev environment with local data",
"name": "Environment",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
Expand All @@ -9,17 +9,17 @@
"onCreateCommand": "pip install -e . && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait",
"postStartCommand": "docker volume prune -f",
"hostRequirements": {
"cpus": 2,
"cpus": 4,
"memory": "16gb",
"storage": "32gb"
},
"forwardPorts": [
3306
],
"customizations": {
"customizations": {
"settings": {
"python.pythonPath": "/usr/local/bin/python"
},
},
"vscode": {
"extensions": [
"ms-python.python",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
version: "3"
services:
app:
cpus: 2
cpus: 4
mem_limit: 16g
build:
context: ../..
dockerfile: ./.devcontainer/Dockerfile
# build:
# context: ../..
# dockerfile: ./.devcontainer/Dockerfile
image: datajoint/workflow_calcium_imaging_devcontainer:latest
extra_hosts:
- fakeservices.datajoint.io:127.0.0.1
volumes:
- ../../..:/workspaces:cached
- ../..:/workspaces/workflow-calcium-imaging:cached
- docker_data:/var/lib/docker # persist docker images
privileged: true # only because of dind
volumes:
Expand Down

This file was deleted.

46 changes: 0 additions & 46 deletions .github/.staging_workflows/anchored_u24_workflow_release_call.yaml

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions .github/.staging_workflows/normalize.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .github/.test/.secrets

This file was deleted.

3 changes: 0 additions & 3 deletions .github/.test/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/make-dev.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .github/make-prod.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .github/make-test.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .github/run-act.sh

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release
on:
workflow_dispatch:
jobs:
devcontainer-build:
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
devcontainer-publish:
needs:
- devcontainer-build
uses: datajoint/.github/.github/workflows/devcontainer-publish.yaml@main
secrets:
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN}}
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Test
on:
push:
pull_request:
jobs:
devcontainer-build:
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
18 changes: 0 additions & 18 deletions .github/workflows/u24_workflow_before_release.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/u24_workflow_release_call.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/u24_workflow_tag_to_release.yaml

This file was deleted.

Loading

0 comments on commit dcb7b39

Please sign in to comment.