Skip to content

Commit

Permalink
Merge pull request #1384 from mahesh-panchal/master
Browse files Browse the repository at this point in the history
Add Gitpod environment to nf-core tools
  • Loading branch information
mahesh-panchal authored Feb 1, 2022
2 parents cbbf22a + 1d1f5e8 commit acf3bf8
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
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 @@ -63,6 +63,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

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

0 comments on commit acf3bf8

Please sign in to comment.