Skip to content

Commit 47d8c3f

Browse files
authored
Merge pull request #936 from PatrickRice-KSC/add_gitpod_support
Implement GitPod integration
2 parents 1fcf6cf + 05235a1 commit 47d8c3f

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

.gitpod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
image: gitpod/workspace-go
2+
tasks:
3+
- init: go get
4+
- name: Start acceptance Test Environment
5+
command: make testacc-up
6+
openMode: split-right
7+
# Port 8080 is used for acceptance testing, and we don't need to open it when the container comes up
8+
ports:
9+
- port: 8080
10+
onOpen: ignore
11+
vscode:
12+
extensions:
13+
- golang.Go
14+
- hashicorp.terraform

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Documentation in [/docs](/docs) is auto-generated by [terraform-plugin-docs](htt
6060

6161
## Developing The Provider
6262

63+
### Set Up Your Local Environment
64+
6365
You'll first need [Go](http://www.golang.org) installed on your machine (version 1.16+ is *required*).
6466

6567
1. Clone the git repository.
@@ -75,6 +77,34 @@ You'll first need [Go](http://www.golang.org) installed on your machine (version
7577
$ make build
7678
```
7779

80+
81+
### Use a Remote Environment via GitPod
82+
83+
You can choose to use your own development environment if desired, however a `.gitpod.yml` file is included within the repository to allow the use of [GitPod](https://gitpod.io/) easily.
84+
This will allow you to use GitPod's integration with GitHub to quickly start a web-based development environment including Go and Docker, which are necessary
85+
for running tests. To use GitPod's integration, you have two different options described below. After you've completed one of the two options, your development environment
86+
will be ready within a minute or two. As part of starting up, your development environment will automatically start up the `gitlab-ce` container necessary for running
87+
tests, as described in the "Running Tests/Option 1" section below.
88+
89+
90+
#### Option 1: Manually navigate to GitPod
91+
92+
You can manually sign in and open your workspace within GitPod by following these steps:
93+
94+
1. Navigate to [GitPod](https://gitpod.io/)
95+
1. Click [Login](https://gitpod.io/login/) if you have an account, or [Sign Up](https://www.gitpod.io/#get-started) if you do not.
96+
1. Click on "Continue with GitHub" and authorize GitPod to access your account.
97+
1. After you've signed in, select "Projects" along the top menu, click on your forked `terraform-provider-gitlab` project
98+
1. Hover over either the main branch for your fork or the branch you created for your fork, and click "New Workspace"
99+
100+
#### Option 2: Open your GitPod Workspace directly via URL
101+
102+
1. Navigate to your fork of the `terraform-provider-gitlab` project in GitHub
103+
1. Select the branch you want to develop
104+
1. Add `https://gitpod.io/#` to the front of your URL
105+
106+
Your workspace will automatically open the repository and branch that you selected in GitHub.
107+
78108
### Running Tests
79109

80110
The acceptance tests can run against a Gitlab instance where you have a token with administrator permissions (likely not gitlab.com).

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Terraform Provider for Gitlab
66

77
[![Tests](https://github.com/gitlabhq/terraform-provider-gitlab/actions/workflows/push.yml/badge.svg)](https://github.com/gitlabhq/terraform-provider-gitlab/actions/workflows/push.yml)
8+
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
89

910
- [Documentation](https://www.terraform.io/docs/providers/gitlab/index.html)
1011
- [Issues](https://github.com/gitlabhq/terraform-provider-gitlab/issues)

0 commit comments

Comments
 (0)