Merge pull request #447 from puppetlabs/pdksync_gitpod
pdksync - Update pdk-templates for gitpod and codespaces support
This commit is contained in:
6
.devcontainer/Dockerfile
Normal file
6
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM puppet/pdk:latest
|
||||
|
||||
# [Optional] Uncomment this section to install additional packages.
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
||||
|
||||
23
.devcontainer/devcontainer.json
Normal file
23
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,23 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
|
||||
{
|
||||
"name": "Puppet Development Kit (Community)",
|
||||
"dockerFile": "Dockerfile",
|
||||
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"puppet.puppet-vscode",
|
||||
"rebornix.Ruby"
|
||||
]
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "pdk --version",
|
||||
}
|
||||
18
.gitpod.Dockerfile
vendored
Normal file
18
.gitpod.Dockerfile
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
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 && \
|
||||
sudo apt-get clean && \
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
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
|
||||
9
.gitpod.yml
Normal file
9
.gitpod.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
image:
|
||||
file: .gitpod.Dockerfile
|
||||
|
||||
tasks:
|
||||
- init: pdk bundle install
|
||||
|
||||
vscode:
|
||||
extensions:
|
||||
- puppet.puppet-vscode@1.0.0:oSzfTkDf6Cmc1jOjgW33VA==
|
||||
@@ -32,6 +32,7 @@
|
||||
/.gitignore
|
||||
/.gitlab-ci.yml
|
||||
/.pdkignore
|
||||
/.puppet-lint.rc
|
||||
/Rakefile
|
||||
/rakelib/
|
||||
/.rspec
|
||||
@@ -40,3 +41,4 @@
|
||||
/.yardopts
|
||||
/spec/
|
||||
/.vscode/
|
||||
/.sync.yml
|
||||
|
||||
@@ -43,7 +43,7 @@ Style/BlockDelimiters:
|
||||
Style/BracesAroundHashParameters:
|
||||
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
|
||||
See https://github.com/rubocop-hq/rubocop/pull/7643
|
||||
Enabled: true
|
||||
Enabled: false
|
||||
Style/ClassAndModuleChildren:
|
||||
Description: Compact style reduces the required amount of indentation.
|
||||
EnforcedStyle: compact
|
||||
|
||||
@@ -43,3 +43,7 @@ Gemfile:
|
||||
spec/spec_helper.rb:
|
||||
mock_with: ":rspec"
|
||||
coverage_report: true
|
||||
.gitpod.Dockerfile:
|
||||
unmanaged: false
|
||||
.gitpod.yml:
|
||||
unmanaged: false
|
||||
|
||||
1
Gemfile
1
Gemfile
@@ -23,6 +23,7 @@ group :development do
|
||||
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
|
||||
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
||||
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))
|
||||
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))
|
||||
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
|
||||
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
|
||||
|
||||
1
data/common.yaml
Normal file
1
data/common.yaml
Normal file
@@ -0,0 +1 @@
|
||||
--- {}
|
||||
21
hiera.yaml
Normal file
21
hiera.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
version: 5
|
||||
|
||||
defaults: # Used for any hierarchy level that omits these keys.
|
||||
datadir: data # This path is relative to hiera.yaml's directory.
|
||||
data_hash: yaml_data # Use the built-in YAML backend.
|
||||
|
||||
hierarchy:
|
||||
- name: "osfamily/major release"
|
||||
paths:
|
||||
# Used to distinguish between Debian and Ubuntu
|
||||
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
|
||||
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
|
||||
# Used for Solaris
|
||||
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
|
||||
- name: "osfamily"
|
||||
paths:
|
||||
- "os/%{facts.os.name}.yaml"
|
||||
- "os/%{facts.os.family}.yaml"
|
||||
- name: 'common'
|
||||
path: 'common.yaml'
|
||||
@@ -82,6 +82,6 @@
|
||||
}
|
||||
],
|
||||
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
|
||||
"template-ref": "heads/main-0-gd610ead",
|
||||
"template-ref": "heads/main-0-g874030e",
|
||||
"pdk-version": "1.18.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user