Skip to content

Commit

Permalink
Merge branch 'main' into datadog-gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
vakpande authored Jun 20, 2024
2 parents ec9c0eb + ef7a220 commit 4659607
Show file tree
Hide file tree
Showing 348 changed files with 6,281 additions and 859 deletions.
66 changes: 53 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
version: 2
jobs:
kitchen-docker-tests:
machine: true
machine:
image: ubuntu-2004:2024.01.2
resource_class: large
environment:
CHEF_LICENSE: accept # newer versions of Chef client need explicit license accept to run
KITCHEN_LOCAL_YAML: kitchen.docker.yml
RUBY_VERSION: '2.6.3' # ruby used to invoke kitchen, not the version used in the tests
DOCKER_BUILDKIT: 0 # Disable buildkit for compatibility with version of kitchen we use
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run:
name: Set Ruby version
command: |
echo "Using $RUBY_VERSION"
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source /home/circleci/.rvm/scripts/rvm
rvm reload
rvm install $RUBY_VERSION
echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
- run:
name: Install bundler
command: gem install bundler:1.17.3
command: gem install bundler:2.3.26
- run:
name: Install dependencies with bundler
command: bundle install --path .bundle
Expand All @@ -25,7 +34,8 @@ jobs:
no_output_timeout: 900

style:
machine: true
machine:
image: ubuntu-2004:202201-02
environment:
CHEF_VERSION: '16.5.77'
RUBY_VERSION: '2.6.3'
Expand All @@ -35,11 +45,15 @@ jobs:
name: Set Ruby version
command: |
echo "Using $RUBY_VERSION"
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
# Update RVM. Using this path instead of https://get.rvm.io because the later uses the letsencrypt cert that breaks openssl 1.0
curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
rvm reload
rvm install $RUBY_VERSION
echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
- run:
name: Install bundler
command: gem install bundler:1.17.3
command: gem install bundler:2.3.26
- run:
name: Check bundler version
command: bundle --version
Expand All @@ -56,7 +70,8 @@ jobs:
command: bundle exec rake style

specs-base: &specs
machine: true
machine:
image: ubuntu-2004:202201-02
environment:
CHEF_VERSION: 'needs-to-be-specified'
RUBY_VERSION: 'needs-to-be-specified'
Expand All @@ -66,11 +81,15 @@ jobs:
name: Set Ruby version
command: |
echo "Using $RUBY_VERSION"
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
# Update RVM. Using this path instead of https://get.rvm.io because the later uses the letsencrypt cert that breaks openssl 1.0
curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
rvm reload
rvm install $RUBY_VERSION
echo . $(rvm $RUBY_VERSION do rvm env --path) >> $BASH_ENV
- run:
name: Install bundler
command: gem install bundler:1.17.3
command: gem install bundler:2.3.26
- run:
name: Check bundler version
command: bundle --version
Expand All @@ -86,6 +105,30 @@ jobs:
name: Run specs
command: bundle exec rake spec

specs-ruby3.0.0-chef17.4.38:
<<: *specs
environment:
CHEF_VERSION: '17.4.38'
RUBY_VERSION: '3.0.0'

specs-ruby3.0.0-chef16.5.77:
<<: *specs
environment:
CHEF_VERSION: '16.5.77'
RUBY_VERSION: '3.0.0'

specs-ruby2.7.2-chef17.4.38:
<<: *specs
environment:
CHEF_VERSION: '17.4.38'
RUBY_VERSION: '2.7.2'

specs-ruby2.7.2-chef16.5.77:
<<: *specs
environment:
CHEF_VERSION: '16.5.77'
RUBY_VERSION: '2.7.2'

specs-ruby2.6.3-chef16.5.77:
<<: *specs
environment:
Expand All @@ -110,20 +153,17 @@ jobs:
CHEF_VERSION: '13.12.14'
RUBY_VERSION: '2.4.3'

specs-ruby2.3.6-chef13.12.14:
<<: *specs
environment:
CHEF_VERSION: '13.12.14'
RUBY_VERSION: '2.3.6'

workflows:
version: 2
build_and_test:
jobs:
- kitchen-docker-tests
- style
- specs-ruby3.0.0-chef17.4.38
- specs-ruby3.0.0-chef16.5.77
- specs-ruby2.7.2-chef17.4.38
- specs-ruby2.7.2-chef16.5.77
- specs-ruby2.6.3-chef16.5.77
- specs-ruby2.6.3-chef14.10.9
- specs-ruby2.5.1-chef14.10.9
- specs-ruby2.4.3-chef13.12.14
- specs-ruby2.3.6-chef13.12.14
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @DataDog/agent-platform
* @DataDog/agent-build-and-releases

# Docs
*README.md @DataDog/agent-platform @DataDog/documentation
*README.md @DataDog/agent-build-and-releases @DataDog/documentation
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug Report
about: Identify a bug in the scripts
title: "[BUG] "
labels: triage
assignees: ''

---

<!--
If you have identified a specific bug in the scripts, please describe it here. If the
issue requires further debugging or investigation, that will be best accomplished via support. Please contact Datadog [support](http://docs.datadoghq.com/help/).
-->


**Environment details (Operating System, Cloud provider, etc):**


**Describe what happened:**


**Describe what you expected:**


**Steps to reproduce the issue:**
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Feature Request
about: Suggest a new feature
title: ''
labels: ''
assignees: ''

---

This issue tracker is primarily used to track bugs in the scripts. For feature requests, please contact [Datadog support](http://docs.datadoghq.com/help/) and share your ideas with them.

Thanks!
53 changes: 53 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
* New contributors are highly encouraged to read our
[CONTRIBUTING](/CONTRIBUTING.md) documentation.
* The pull request:
* Should only fix one issue or add one feature at a time.
* Must update the test suite for the relevant functionality.
* Should pass all status checks before being reviewed or merged.
* Commit titles should be prefixed with general area of pull request's change.
* Draft PRs should be prefixed with `[WIP]` in their title.
-->
### What does this PR do?

<!--
* A brief description of the change being made with this pull request.
* If the description here cannot be expressed in a succinct form, consider
opening multiple pull requests instead of a single one.
-->

### Motivation

<!--
* What inspired you to submit this pull request?
* Link any related GitHub issues or PRs here.
-->

### Additional Notes

<!--
* Anything else we should know when reviewing?
* Include benchmarking information here whenever possible.
* Include info about alternatives that were considered and why the proposed
version was chosen.
-->

### Possible Drawbacks / Trade-offs

<!--
* What are the possible side-effects or negative impacts of the code change?
-->

### Describe how to test/QA your changes

<!--
* Write here in detail or link to detailed instructions on how this change can
be tested/QAd/validated, including any environment setup.
-->

### Reviewer's Checklist
<!--
* Authors can use this list as a reference to ensure that there are no problems
during the review but the signing off is to be done by the reviewer(s).
Note: Adding GitHub labels is only possible for contributors with write access.
-->
46 changes: 46 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 2 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ group :integration do
cookbook 'sudo' # Use '< 5.0.0' with Chef < 13
cookbook 'test', path: './test/cookbooks/test' # Used to test custom resources (datadog_monitor, integration)
end

cookbook 'yum', '< 7.0.0'
Loading

0 comments on commit 4659607

Please sign in to comment.