From 61e1dc40fdbea4126558ce69a36a3e3ff48da4b7 Mon Sep 17 00:00:00 2001 From: georgiesamaha Date: Wed, 9 Oct 2024 10:00:02 +1100 Subject: [PATCH 1/5] Update ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2a9b129..547a28b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ results/ work/ site/ +.DS_Store From a0dd8882d6ab1eaa0433194c685e896e2fe56e63 Mon Sep 17 00:00:00 2001 From: georgiesamaha Date: Wed, 9 Oct 2024 10:02:02 +1100 Subject: [PATCH 2/5] Add gitpod configs --- .github/.gitpod.Dockerfile | 41 ++++++++++++++++++++++++++++ .gitpod.code-workspace | 15 ++++++++++ .gitpod.yml | 56 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 .github/.gitpod.Dockerfile create mode 100644 .gitpod.code-workspace create mode 100644 .gitpod.yml diff --git a/.github/.gitpod.Dockerfile b/.github/.gitpod.Dockerfile new file mode 100644 index 0000000..96be117 --- /dev/null +++ b/.github/.gitpod.Dockerfile @@ -0,0 +1,41 @@ +# Use the Gitpod workspace base image +FROM gitpod/workspace-base + +USER root + +# Set environment variables +ENV TZ=Australia/Sydney +ENV DEBIAN_FRONTEND=noninteractive + +# Set the timezone and install required utilities +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ + apt-get update --quiet && \ + apt-get install --quiet --yes \ + apt-transport-https \ + apt-utils \ + sudo \ + git \ + less \ + wget \ + curl \ + tree \ + graphviz \ + zip \ + unzip \ + default-jre \ + ca-certificates + +# Install Nextflow +RUN curl -s https://get.nextflow.io | bash && \ + chmod 755 ./nextflow && \ + mv ./nextflow /usr/local/bin + +# Create .nextflow directory and set proper permissions +RUN mkdir -p /home/gitpod/.nextflow && \ +chown -R gitpod:gitpod /home/gitpod/.nextflow + +# Change user back to gitpod +USER gitpod + +# Set the entrypoint +ENTRYPOINT ["/bin/bash"] diff --git a/.gitpod.code-workspace b/.gitpod.code-workspace new file mode 100644 index 0000000..7233117 --- /dev/null +++ b/.gitpod.code-workspace @@ -0,0 +1,15 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "editor.tabSize": 2, + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true + }, + "gitpod.workspaceFolder": "/workspace/hello-nextflow" + } +} \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..9596401 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,56 @@ +# Custom workspace and checkout locations +workspaceLocation: gitpod/gitpod-ws.code-workspace # Refers to your .code-workspace file +checkoutLocation: gitpod # Optional, but you can keep it if it's meaningful to your setup + +# GitHub prebuild configuration +github: + prebuilds: + # Enable prebuilds for the master/default branch + master: true + # Disable prebuilds for all branches + branches: false + # Enable prebuilds for pull requests from this repo + pullRequests: true + # Enable prebuilds for pull requests from forks + pullRequestsFromForks: true + # Disable "Review in Gitpod" comment on PRs + addComment: false + # Disable "Review in Gitpod" badge on PRs + addBadge: false + +# Docker image to use for the workspace +image: .gitpod.Dockerfile + +# Tasks to execute during workspace initialization and startup +tasks: + - before: printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc && exit + + - name: Download containers + init: | + docker pull quay.io/biocontainers/salmon:1.10.1--h7e5ed60_0 + docker pull quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0 + docker pull quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0 + command: docker run hello-world + + - name: Start web server + command: gp ports await 23000 && gp preview https://training.nextflow.io + + - name: Start tutorial + command: | + cd hello-nextflow + source $HOME/.bashrc + export PS1='\[\e[3;36m\]${PWD/*\//} ->\[\e[0m\] ' + unset JAVA_TOOL_OPTIONS + clear + +# VSCode extensions to install in the workspace +vscode: + extensions: + - codezombiech.gitignore # Support for .gitignore files + - cssho.vscode-svgviewer # SVG viewer + - esbenp.prettier-vscode # Prettier for markdown formatting + - EditorConfig.EditorConfig # Support for .editorconfig + - Gruntfuggly.todo-tree # Display TODO/FIXME comments in a tree view + - nextflow.nextflow # Nextflow syntax highlighting + - streetsidesoftware.code-spell-checker # Spell checker for source code + - ms-vscode.live-server # Live server for web development From 3974682ec0d375728b3f259a0de80057eba6c458 Mon Sep 17 00:00:00 2001 From: georgiesamaha Date: Wed, 9 Oct 2024 10:15:20 +1100 Subject: [PATCH 3/5] Add pages url to yml --- .gitpod.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 9596401..b782c92 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -33,7 +33,7 @@ tasks: command: docker run hello-world - name: Start web server - command: gp ports await 23000 && gp preview https://training.nextflow.io + command: gp ports await 23000 && gp preview https://sydney-informatics-hub.github.io/hello-nextflow/ - name: Start tutorial command: | @@ -49,8 +49,8 @@ vscode: - codezombiech.gitignore # Support for .gitignore files - cssho.vscode-svgviewer # SVG viewer - esbenp.prettier-vscode # Prettier for markdown formatting - - EditorConfig.EditorConfig # Support for .editorconfig - - Gruntfuggly.todo-tree # Display TODO/FIXME comments in a tree view + #- EditorConfig.EditorConfig # Support for .editorconfig + #- Gruntfuggly.todo-tree # Display TODO/FIXME comments in a tree view - nextflow.nextflow # Nextflow syntax highlighting - streetsidesoftware.code-spell-checker # Spell checker for source code - ms-vscode.live-server # Live server for web development From 20635bc80bc50293ec6d5008418bea8098055ca5 Mon Sep 17 00:00:00 2001 From: georgiesamaha Date: Wed, 9 Oct 2024 10:22:17 +1100 Subject: [PATCH 4/5] Create directories in gitpod env --- .gitpod.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index b782c92..f9bd4b8 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,6 @@ # Custom workspace and checkout locations workspaceLocation: gitpod/gitpod-ws.code-workspace # Refers to your .code-workspace file -checkoutLocation: gitpod # Optional, but you can keep it if it's meaningful to your setup +checkoutLocation: gitpod # GitHub prebuild configuration github: @@ -21,10 +21,17 @@ github: # Docker image to use for the workspace image: .gitpod.Dockerfile -# Tasks to execute during workspace initialization and startup +# Tasks to execute during workspace initialisation and startup tasks: - before: printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc && exit + # Create directory structure + - name: Create Directories + init: | + mkdir -p ~/hello-nextflow/part1 + mkdir -p ~/hello-nextflow/part2 + +# Download containers to be used in part 2 - name: Download containers init: | docker pull quay.io/biocontainers/salmon:1.10.1--h7e5ed60_0 @@ -32,9 +39,11 @@ tasks: docker pull quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0 command: docker run hello-world +# Open docs in a web browser - name: Start web server command: gp ports await 23000 && gp preview https://sydney-informatics-hub.github.io/hello-nextflow/ +# Start the tutorial - name: Start tutorial command: | cd hello-nextflow From 27ca8f8d5620bc5f1f9456bf08a3cdb73d78377d Mon Sep 17 00:00:00 2001 From: georgiesamaha Date: Wed, 9 Oct 2024 10:23:59 +1100 Subject: [PATCH 5/5] Test in gitpod ws --- .gitpod.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index f9bd4b8..38d8d7f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -25,6 +25,12 @@ image: .gitpod.Dockerfile tasks: - before: printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc && exit + # FOR TESTING: check out workspace in the `gitpod` branch + - name: Checkout gitpod branch + init: | + git fetch origin gitpod # Fetch the latest changes for the gitpod branch + git checkout gitpod || git checkout -b gitpod origin/gitpod # Switch to the gitpod branch + # Create directory structure - name: Create Directories init: |