Skip to content

Commit d0b3716

Browse files
authored
Merge pull request #2092 from puppetlabs/pdksync_gitpod
pdksync - Update pdk-templates for gitpod and codespaces support
2 parents b356a7f + abb3817 commit d0b3716

File tree

12 files changed

+94
-10
lines changed

12 files changed

+94
-10
lines changed

.devcontainer/Dockerfile

Lines changed: 6 additions & 0 deletions
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

Lines changed: 23 additions & 0 deletions
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

Lines changed: 18 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
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+
- puppet.puppet-vscode@1.0.0:oSzfTkDf6Cmc1jOjgW33VA==

.pdkignore

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ Rakefile:
4949
spec/spec_helper.rb:
5050
mock_with: ":rspec"
5151
coverage_report: true
52+
.gitpod.Dockerfile:
53+
unmanaged: false
54+
.gitpod.yml:
55+
unmanaged: false

Gemfile

Lines changed: 1 addition & 0 deletions
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]

Rakefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,36 +53,35 @@ if Bundler.rubygems.find_name('github_changelog_generator').any?
5353
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
5454
config.add_pr_wo_labels = true
5555
config.issues = false
56-
config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"
56+
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
5757
config.configure_sections = {
5858
"Changed" => {
5959
"prefix" => "### Changed",
6060
"labels" => ["backwards-incompatible"],
6161
},
6262
"Added" => {
6363
"prefix" => "### Added",
64-
"labels" => ["feature", "enhancement"],
64+
"labels" => ["enhancement", "feature"],
6565
},
6666
"Fixed" => {
6767
"prefix" => "### Fixed",
68-
"labels" => ["bugfix"],
68+
"labels" => ["bug", "documentation", "bugfix"],
6969
},
7070
}
7171
end
7272
else
7373
desc 'Generate a Changelog from GitHub'
7474
task :changelog do
7575
raise <<EOM
76-
The changelog tasks depends on unreleased features of the github_changelog_generator gem.
76+
The changelog tasks depends on recent features of the github_changelog_generator gem.
7777
Please manually add it to your .sync.yml for now, and run `pdk update`:
7878
---
7979
Gemfile:
8080
optional:
8181
':development':
8282
- gem: 'github_changelog_generator'
83-
git: 'https://github.com/skywinder/github-changelog-generator'
84-
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
85-
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
83+
version: '~> 1.15'
84+
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')"
8685
EOM
8786
end
8887
end

data/common.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--- {}

0 commit comments

Comments
 (0)