Skip to content
Snippets Groups Projects
Commit a40e148e authored by Corey Osman's avatar Corey Osman
Browse files

Add gitpod support for puppet modules

  * This adds initial support for gipod puppet development.  Any user
    who opens the module in gitpod would automatically
    stand up a pdk and puppet development environment.

    While this is a first stab at this file I expect further customizations
    to follow and allow the user to utilize the sync or config_defaults
    to tweak their own unique gitpod.

  * By default the gitpod files are unmanaged
parent 4236b601
Branches
Tags
No related merge requests found
......@@ -74,6 +74,17 @@ Gitlab CI uses a .gitlab-ci.yml file in the root of your repository tell Gitlab
| custom_before_steps |Allows you to pass additional steps to the GitLab CI before_script. Please see the [.gitlab-ci.yml](https://docs.gitlab.com/ce/ci/yaml/#before_script-and-after_script) docs for specifics.|
| default_before_script |If false, removes the default `before_script` section. Useful if you need a customised Bundler install, or to remove Bundler entirely. If the key is unset the default behaviour is to add `before_script`.|
### Gitpod configuration
If you are using Gitpod you will need to opt-in and enable gitpod support for pdk-templates. To do this simple set the following configurations.
```
.gitpod.Dockerfile:
unmanaged: false
.gitpod.yml:
unmanaged: false
```
### .pdkignore
>A .pdkignore file in your repo allows you to specify files to ignore when building a module package with `pdk build`.
......
......@@ -625,6 +625,10 @@ Gemfile:
puppet_version: '~> 5'
# beaker: true
default_before_script: true
.gitpod.Dockerfile:
unmanaged: true
.gitpod.yml:
unmanaged: true
spec/default_facts.yml:
ipaddress: "172.16.254.254"
ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
......
FROM gitpod/workspace-full
RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \
wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \
sudo dpkg -i puppet6-release-bionic.deb && \
sudo dpkg -i puppet-tools-release-bionic.deb && \
sudo apt-get update && sudo apt-get install -y pdk zsh puppet-agent
RUN sudo usermod -s $(which zsh) gitpod && \
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \
echo 'PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin"' >> /home/gitpod/.zshrc && \
sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \
mkdir -p /home/gitpod/.config/puppet && \
/opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml
RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb
ENTRYPOINT /usr/bin/zsh
image:
file: .gitpod.Dockerfile
tasks:
- init: pdk bundle install
vscode:
extensions:
- puppet.puppet-vscode@0.28.0:g5CT+jlJywUtP9HoX4DIZg==
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment