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

Restructure CI and add DevContainer build automation #116

Merged
merged 24 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad47c21
Include a reusable workflow test.
guzman-raphael May 12, 2023
bc852de
Remove nested subdirectory call.
guzman-raphael May 12, 2023
257939f
Update workflow reference.
guzman-raphael May 12, 2023
6194478
Move image definition to base compose file.
guzman-raphael May 15, 2023
170830c
Add devcontainer push step.
guzman-raphael May 15, 2023
dba21b8
Pass array to needs block.
guzman-raphael May 15, 2023
2713067
Try again.
guzman-raphael May 15, 2023
81a6fcb
Add workflow dispatch option when publishing.
guzman-raphael May 15, 2023
e131daf
Debug CI trigger.
guzman-raphael May 16, 2023
b22d723
Fix typo.
guzman-raphael May 16, 2023
3845069
Apply correct logic handling for job trigger.
guzman-raphael May 16, 2023
01354dd
Remove build dependency on compose.
guzman-raphael May 16, 2023
50bb80b
Trigger new CI run.
guzman-raphael May 16, 2023
2ac6059
Clarify purpose of GHA workflows and clean up.
guzman-raphael May 16, 2023
7415e11
Add test runs on PR.
guzman-raphael May 16, 2023
d77df4f
Fix merge conflicts.
guzman-raphael May 16, 2023
649a7f3
Apply review suggestions.
guzman-raphael May 16, 2023
2bcb050
Add setting for kernel back.
guzman-raphael May 16, 2023
7d0459e
Pass secret along.
guzman-raphael May 16, 2023
19c1abd
Remove debugging clutter.
guzman-raphael May 16, 2023
9fdeb6b
Disable compose build to force pull.
guzman-raphael May 16, 2023
0105bae
Move references closer to their final destination.
guzman-raphael May 16, 2023
28d277f
Bump up RAM due to local db and use PROD actions.
guzman-raphael May 16, 2023
fad3f36
Update doc.
guzman-raphael May 16, 2023
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
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