Skip to content

Commit 0664e07

Browse files
committed
Update pdk-templates for gitpod and codespaces support
1 parent 5fd7450 commit 0664e07

10 files changed

+65
-3
lines changed

.devcontainer/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM puppet/pdk:latest
2+
3+
# [Optional] Uncomment this section to install additional packages.
4+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
# && apt-get -y install --no-install-recommends <your-package-list-here>
6+

.devcontainer/devcontainer.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
3+
{
4+
"name": "Puppet Development Kit (Community)",
5+
"dockerFile": "Dockerfile",
6+
7+
// Set *default* container specific settings.json values on container create.
8+
"settings": {
9+
"terminal.integrated.shell.linux": "/bin/bash"
10+
},
11+
12+
// Add the IDs of extensions you want installed when the container is created.
13+
"extensions": [
14+
"puppet.puppet-vscode",
15+
"rebornix.Ruby"
16+
]
17+
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
// "postCreateCommand": "pdk --version",
23+
}

.gitpod.Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM gitpod/workspace-full
2+
RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \
3+
wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \
4+
sudo dpkg -i puppet6-release-bionic.deb && \
5+
sudo dpkg -i puppet-tools-release-bionic.deb && \
6+
sudo apt-get update && \
7+
sudo apt-get install -y pdk zsh puppet-agent && \
8+
sudo apt-get clean && \
9+
sudo rm -rf /var/lib/apt/lists/*
10+
RUN sudo usermod -s $(which zsh) gitpod && \
11+
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
12+
echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \
13+
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 && \
14+
sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \
15+
mkdir -p /home/gitpod/.config/puppet && \
16+
/opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml
17+
RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb
18+
ENTRYPOINT /usr/bin/zsh

.gitpod.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
4+
tasks:
5+
- init: pdk bundle install
6+
7+
vscode:
8+
extensions:
9+
- [email protected]:oSzfTkDf6Cmc1jOjgW33VA==

.pdkignore

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
/.gitignore
3333
/.gitlab-ci.yml
3434
/.pdkignore
35+
/.puppet-lint.rc
3536
/Rakefile
3637
/rakelib/
3738
/.rspec
@@ -40,3 +41,4 @@
4041
/.yardopts
4142
/spec/
4243
/.vscode/
44+
/.sync.yml

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Style/BlockDelimiters:
4343
Style/BracesAroundHashParameters:
4444
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
4545
See https://github.com/rubocop-hq/rubocop/pull/7643
46-
Enabled: true
46+
Enabled: false
4747
Style/ClassAndModuleChildren:
4848
Description: Compact style reduces the required amount of indentation.
4949
EnforcedStyle: compact

.sync.yml

+4
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ Rakefile:
4545
spec/spec_helper.rb:
4646
mock_with: ":rspec"
4747
coverage_report: true
48+
.gitpod.Dockerfile:
49+
unmanaged: false
50+
.gitpod.yml:
51+
unmanaged: false

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ jobs:
126126
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
127127
rvm: 2.5.7
128128
stage: spec
129-
dist: trusty
130129
branches:
131130
only:
132131
- main

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ group :development do
2323
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
2424
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2525
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
26+
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
2627
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
2728
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
2829
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@
9393
],
9494
"description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux, Amazon Linux and Gentoo.",
9595
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
96-
"template-ref": "heads/main-0-gd610ead",
96+
"template-ref": "heads/main-0-g874030e",
9797
"pdk-version": "1.18.1"
9898
}

0 commit comments

Comments
 (0)