Skip to content

Commit acf3bf8

Browse files
Merge pull request #1384 from mahesh-panchal/master
Add Gitpod environment to nf-core tools
2 parents cbbf22a + 1d1f5e8 commit acf3bf8

File tree

5 files changed

+103
-0
lines changed

5 files changed

+103
-0
lines changed

.github/workflows/build_gitpod.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: nf-core gitpod build and push
2+
# Builds the docker image for gitpod and pushes it to DockerHub
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
paths:
9+
- 'nf_core/gitpod/gitpod.Dockerfile'
10+
- '.github/workflows/build_gitpod.yml'
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to Docker Hub
15+
runs-on: ubuntu-latest
16+
# Only run for the nf-core repo, for releases and merged PRs
17+
if: ${{ github.repository == 'nf-core/tools' }}
18+
steps:
19+
- name: Check out the repo
20+
uses: actions/checkout@v2
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_PASS }}
27+
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@v3
31+
with:
32+
images: nfcore/gitpod
33+
tags: |
34+
type=semver,pattern={{version}}
35+
type=raw,value=latest
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v2
39+
with:
40+
context: .
41+
file: nf_core/gitpod/gitpod.Dockerfile
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}

.gitpod.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
image: nfcore/gitpod:latest
2+
tasks:
3+
- name: install current state of nf-core/tools
4+
command: |
5+
python -m pip install --upgrade -r requirements-dev.txt -e .
6+
vscode:
7+
extensions: # based on nf-core.nf-core-extensionpack
8+
- codezombiech.gitignore # Language support for .gitignore files
9+
# - cssho.vscode-svgviewer # SVG viewer
10+
- davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code
11+
- eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed
12+
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
13+
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
14+
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
15+
# - nextflow.nextflow # Nextflow syntax highlighting
16+
- oderwat.indent-rainbow # Highlight indentation level
17+
- streetsidesoftware.code-spell-checker # Spelling checker for source code

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
* Remove base `Dockerfile` used for DSL1 pipeline container builds
6464
* Run tests with Python 3.10
6565
* [#1363](https://github.com/nf-core/tools/pull/1363) Fix tools CI workflow nextflow versions.
66+
* [#1384](https://github.com/nf-core/tools/pull/1384) Adds Gitpod environment and Dockerfile.
67+
* Adds conda, Nextflow, nf-core, pytest-workflow, mamba, and pip to base Gitpod Docker image.
68+
* Adds GH action to build and push Gitpod Docker image.
69+
* Adds Gitpod environment to template.
70+
* Adds Gitpod environment to tools with auto build of nf-core tool.
6671

6772
### Modules
6873

nf_core/gitpod/gitpod.Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM gitpod/workspace-full
2+
3+
USER root
4+
5+
# Install Conda
6+
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
7+
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
8+
rm Miniconda3-latest-Linux-x86_64.sh
9+
10+
ENV PATH="/opt/conda/bin:$PATH"
11+
12+
RUN chown -R gitpod:gitpod /opt/conda
13+
14+
USER gitpod
15+
16+
# Install nextflow, nf-core, Mamba, and pytest-workflow
17+
RUN conda update -n base -c defaults conda && \
18+
conda install nextflow nf-core pytest-workflow mamba pip -n base -c conda-forge -c bioconda && \
19+
nextflow self-update && \
20+
conda config --add channels defaults && \
21+
conda config --add channels bioconda && \
22+
conda config --add channels conda-forge && \
23+
conda clean --all -f -y
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
image: nfcore/gitpod:latest
2+
3+
vscode:
4+
extensions: # based on nf-core.nf-core-extensionpack
5+
- codezombiech.gitignore # Language support for .gitignore files
6+
# - cssho.vscode-svgviewer # SVG viewer
7+
- davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code
8+
- eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed
9+
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
10+
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
11+
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
12+
# - nextflow.nextflow # Nextflow syntax highlighting
13+
- oderwat.indent-rainbow # Highlight indentation level
14+
- streetsidesoftware.code-spell-checker # Spelling checker for source code

0 commit comments

Comments
 (0)