Skip to content

Commit f1f005b

Browse files
authored
Add Gitpod support (#122)
1 parent aab9fb1 commit f1f005b

File tree

6 files changed

+99
-2
lines changed

6 files changed

+99
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ packages.config
3434

3535
# macOS
3636

37-
.DS_Store
37+
.DS_Store
38+
39+
# VS Code User Settings
40+
.vscode

.gitpod.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
image:
2+
file: .gitpod/gitpod.Dockerfile
3+
4+
tasks:
5+
- name: Build
6+
before: "./.gitpod/gitpod-init.sh"
7+
init: |
8+
dotnet build ./Propulsion.sln
9+
10+
vscode:
11+
extensions:
12+
13+
14+
15+
github:
16+
prebuilds:
17+
# enable for the master/default branch (defaults to true)
18+
master: true
19+
# enable for all branches in this repo (defaults to false)
20+
branches: true
21+
# enable for pull requests coming from this repo (defaults to true)
22+
pullRequests: true
23+
# enable for pull requests coming from forks (defaults to false)
24+
pullRequestsFromForks: true
25+
# add a check to pull requests (defaults to true)
26+
addCheck: false
27+
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
28+
addComment: false
29+
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
30+
addBadge: false

.gitpod/gitpod-init.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /usr/bin/env bash
2+
3+
# This script only updates the settings if it's run in a Gitpod workspace.
4+
if [[ -n "${GITPOD_WORKSPACE_URL}" ]]; then
5+
# Workaround for: https://github.com/gitpod-io/gitpod/issues/5090
6+
cp -R /home/gitpod/dotnet /tmp/dotnet
7+
8+
# Copy the VS Code settings used in Gitpod to make dev tooling work out of the box
9+
mkdir -p .vscode && cp .gitpod/vscode.settings.json .vscode/settings.json
10+
fi
11+

.gitpod/gitpod.Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM gitpod/workspace-base
2+
3+
############
4+
### .Net ###
5+
############
6+
# Install .NET SDK (Current channel)
7+
# Source: https://docs.microsoft.com/dotnet/core/install/linux-scripted-manual#scripted-install
8+
USER gitpod
9+
ENV DOTNET_VERSION=5.0
10+
RUN mkdir -p /home/gitpod/dotnet && curl -fsSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel ${DOTNET_VERSION} --install-dir /home/gitpod/dotnet
11+
# This is a workaround until this bug has been resolved: https://github.com/gitpod-io/gitpod/issues/5090
12+
# We copy the .Net installation to /tmp/dotnet in our prebuild script
13+
# Once the bug has been fixed we should change the envs and remove the prebuild workaround
14+
#ENV DOTNET_ROOT=/home/gitpod/dotnet
15+
#ENV PATH=$PATH:/home/gitpod/dotnet
16+
RUN cp -R /home/gitpod/dotnet /tmp/dotnet
17+
ENV DOTNET_ROOT=/tmp/dotnet
18+
ENV PATH=$PATH:/tmp/dotnet
19+
20+
# Install global .Net tools
21+
# Note: Fantomas alpha version is required for Ionide -> Fantomas integration to work properly: https://github.com/ionide/ionide-vscode-fsharp/issues/1606
22+
RUN dotnet tool install -g fantomas-tool --version 4.6.0-alpha-007
23+
ENV PATH=$PATH:/home/gitpod/.dotnet/tools
24+
25+
##############
26+
### Docker ###
27+
##############
28+
USER root
29+
# https://docs.docker.com/engine/install/ubuntu/
30+
RUN curl -o /var/lib/apt/dazzle-marks/docker.gpg -fsSL https://download.docker.com/linux/ubuntu/gpg \
31+
&& apt-key add /var/lib/apt/dazzle-marks/docker.gpg \
32+
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
33+
&& install-packages docker-ce=5:19.03.15~3-0~ubuntu-focal docker-ce-cli=5:19.03.15~3-0~ubuntu-focal containerd.io
34+
35+
RUN curl -o /usr/bin/slirp4netns -fsSL https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.11/slirp4netns-$(uname -m) \
36+
&& chmod +x /usr/bin/slirp4netns
37+
38+
RUN curl -o /usr/local/bin/docker-compose -fsSL https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64 \
39+
&& chmod +x /usr/local/bin/docker-compose
40+
41+
USER gitpod

.gitpod/vscode.settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
////////////
3+
// General
4+
////////////
5+
"extensions.ignoreRecommendations": true,
6+
"extensions.autoUpdate": false,
7+
//////////
8+
// F#
9+
//////////
10+
"FSharp.enableMSBuildProjectGraph": false,
11+
"FSharp.workspacePath": "./Equinox.sln",
12+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Propulsion [![Build Status](https://dev.azure.com/jet-opensource/opensource/_apis/build/status/jet.Propulsion)](https://dev.azure.com/jet-opensource/opensource/_build/latest?definitionId=16) [![release](https://img.shields.io/github/release/jet/propulsion.svg)](https://github.com/jet/propulsion/releases) [![NuGet](https://img.shields.io/nuget/vpre/Propulsion.svg?logo=nuget)](https://www.nuget.org/packages/Propulsion/) [![license](https://img.shields.io/github/license/jet/propulsion.svg)](LICENSE) ![code size](https://img.shields.io/github/languages/code-size/jet/propulsion.svg) [<img src="https://img.shields.io/badge/slack-DDD--CQRS--ES%20%23equinox-yellow.svg?logo=slack">](https://j.mp/ddd-es-cqrs) [![docs status](https://img.shields.io/badge/DOCUMENTATION-WIP-important.svg?style=popout)](DOCUMENTATION.md)
1+
# Propulsion [![Build Status](https://dev.azure.com/jet-opensource/opensource/_apis/build/status/jet.Propulsion)](https://dev.azure.com/jet-opensource/opensource/_build/latest?definitionId=16) [![release](https://img.shields.io/github/release/jet/propulsion.svg)](https://github.com/jet/propulsion/releases) [![NuGet](https://img.shields.io/nuget/vpre/Propulsion.svg?logo=nuget)](https://www.nuget.org/packages/Propulsion/) [![license](https://img.shields.io/github/license/jet/propulsion.svg)](LICENSE) ![code size](https://img.shields.io/github/languages/code-size/jet/propulsion.svg) [<img src="https://img.shields.io/badge/slack-DDD--CQRS--ES%20%23equinox-yellow.svg?logo=slack">](https://j.mp/ddd-es-cqrs) [![docs status](https://img.shields.io/badge/DOCUMENTATION-WIP-important.svg?style=popout)](DOCUMENTATION.md) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/jet/propulsion)
22

33
While the bulk of this code is in production across various Walmart systems, the [documentation](DOCUMENTATION.md) is very much a work in progress (ideally there'd be a nice [summary of various projection patterns](https://github.com/jet/propulsion/issues/21), but also much [broader information discussing the tradeoffs implied in an event-centric system as a whole](https://github.com/ylorph/The-Inevitable-Event-Centric-Book/issues)
44

0 commit comments

Comments
 (0)