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

Add Gitpod environment to nf-core tools #1384

Merged
merged 24 commits into from
Feb 1, 2022
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
ac26372
Add Gitpod Dockerfile
mahesh-panchal Jan 19, 2022
0eee684
Add Gitpod yaml
mahesh-panchal Jan 19, 2022
585af68
Rename Dockerfile
mahesh-panchal Jan 19, 2022
ae1693d
Add gitpod to pipeline template
mahesh-panchal Jan 19, 2022
e487f41
Add GH action to build Gitpod
mahesh-panchal Jan 19, 2022
7407f0d
Restore Dockerfile for testing purposes
mahesh-panchal Jan 19, 2022
932c199
Fix GH action
mahesh-panchal Jan 19, 2022
2c6476f
Update nf_core/pipeline-template/.gitpod.yml
mahesh-panchal Jan 20, 2022
a7d33d9
Update .gitpod.yml
mahesh-panchal Jan 20, 2022
1f918f9
Add extension pack explanations
mahesh-panchal Jan 20, 2022
e60533a
Update base Gitpod yaml.
mahesh-panchal Jan 20, 2022
9227e86
Update .github/workflows/build_gitpod.yml
mahesh-panchal Jan 20, 2022
4de4730
Add conda update to Dockerfile
mahesh-panchal Jan 21, 2022
2d60149
Add file to build
mahesh-panchal Jan 21, 2022
b2230a7
Change SHA commit to major versions
mahesh-panchal Jan 21, 2022
fa9cb24
Fix image name
mahesh-panchal Jan 21, 2022
12665d0
fix typo in .gitpod.yml
mashehu Jan 21, 2022
9d915be
Add Build path for nf-core tools dev
mahesh-panchal Jan 21, 2022
2d01159
Add GA action to workflow check
mahesh-panchal Jan 21, 2022
f14c2f8
Apply suggestions from code review
mahesh-panchal Jan 31, 2022
bc04c64
Add conda channel defaults
mahesh-panchal Jan 31, 2022
70fc9c4
Add pip to conda environment
mahesh-panchal Jan 31, 2022
9e51064
Update pip install command
mahesh-panchal Jan 31, 2022
1d1f5e8
Update changelog
mahesh-panchal Feb 1, 2022
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
44 changes: 44 additions & 0 deletions .github/workflows/build_gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: nf-core gitpod build and push
# Builds the docker image for gitpod and pushes it to DockerHub

on:
push:
branches:
- 'master'
paths:
- 'nf_core/gitpod/gitpod.Dockerfile'
- '.github/workflows/build_gitpod.yml'

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/tools' }}
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: nfcore/gitpod
tags: |
type=semver,pattern={{version}}
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: nf_core/gitpod/gitpod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
17 changes: 17 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
image: nfcore/gitpod:latest
tasks:
- name: install current state of nf-core/tools
command: |
python -m pip install --upgrade -r requirements-dev.txt -e .
vscode:
extensions: # based on nf-core.nf-core-extensionpack
- codezombiech.gitignore # Language support for .gitignore files
# - cssho.vscode-svgviewer # SVG viewer
- davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code
- eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
# - nextflow.nextflow # Nextflow syntax highlighting
- oderwat.indent-rainbow # Highlight indentation level
- streetsidesoftware.code-spell-checker # Spelling checker for source code
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
* Remove base `Dockerfile` used for DSL1 pipeline container builds
* Run tests with Python 3.10
* [#1363](https://github.com/nf-core/tools/pull/1363) Fix tools CI workflow nextflow versions.
* [#1384](https://github.com/nf-core/tools/pull/1384) Adds Gitpod environment and Dockerfile.
* Adds conda, Nextflow, nf-core, pytest-workflow, mamba, and pip to base Gitpod Docker image.
* Adds GH action to build and push Gitpod Docker image.
* Adds Gitpod environment to template.
* Adds Gitpod environment to tools with auto build of nf-core tool.

### Modules

Expand Down
23 changes: 23 additions & 0 deletions nf_core/gitpod/gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM gitpod/workspace-full

USER root

# Install Conda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
rm Miniconda3-latest-Linux-x86_64.sh
mahesh-panchal marked this conversation as resolved.
Show resolved Hide resolved

ENV PATH="/opt/conda/bin:$PATH"

RUN chown -R gitpod:gitpod /opt/conda

USER gitpod

# Install nextflow, nf-core, Mamba, and pytest-workflow
RUN conda update -n base -c defaults conda && \
conda install nextflow nf-core pytest-workflow mamba pip -n base -c conda-forge -c bioconda && \
nextflow self-update && \
conda config --add channels defaults && \
conda config --add channels bioconda && \
conda config --add channels conda-forge && \
conda clean --all -f -y
14 changes: 14 additions & 0 deletions nf_core/pipeline-template/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
image: nfcore/gitpod:latest

vscode:
extensions: # based on nf-core.nf-core-extensionpack
- codezombiech.gitignore # Language support for .gitignore files
# - cssho.vscode-svgviewer # SVG viewer
- davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code
- eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
# - nextflow.nextflow # Nextflow syntax highlighting
- oderwat.indent-rainbow # Highlight indentation level
- streetsidesoftware.code-spell-checker # Spelling checker for source code