Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate CI job #70

Merged
merged 8 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/puppet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Puppet module
on:
push:
paths:
- .github/workflows/puppet.yaml
- puppet

jobs:
prep:
name: Download modules
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: false
- name: Install dependencies
run: |
wget https://apt.puppet.com/puppet-release-focal.deb
sudo dpkg -i puppet-release-focal.deb
wget https://apt.puppet.com/puppet-tools-release-focal.deb
sudo dpkg -i puppet-tools-release-focal.deb
sudo apt-get update
sudo apt-get install -y puppet-agent puppet-bolt
sudo update-alternatives --install /usr/bin/puppet puppet-agent /opt/puppetlabs/bin/puppet 10
sudo chmod +t /tmp # workaround ruby need within prep.sh
- name: Prep project
run: |
./puppet/prep.sh

puppet-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: false
- name: puppet-lint
uses: scottbrenner/puppet-lint-action@master
with:
args: puppet/ --fail-on-warnings
18 changes: 1 addition & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ stages:
.prep-install-python: &prep-install-python |
dnf install -y python3 python3-pip python3-wheel
dnf clean all && rm -rf /var/cache/yum
pip3 install --upgrade pip pip-tools && ln -s pip3 /usr/bin/pip
pip3 install --upgrade pip pip-tools

.prep-install-docker: &prep-install-docker |
dnf remove -y docker \
Expand Down Expand Up @@ -277,22 +277,6 @@ transcoder_unit-test:
coverage_format: cobertura
path: transcoder/coverage.xml

puppet-lint:
stage: test
needs: []
allow_failure: true
rules:
- if: $TRY_LATEST_PROMOTE != "true"
changes:
- ".gitlab-ci.yml"
- puppet/**/*
before_script:
- *prep-install-ca
- dnf module install -y ruby:2.7
- gem install puppet-lint
script:
- puppet-lint puppet

# Pull in the latest commits from default submodule branches
promote:
stage: build
Expand Down
28 changes: 14 additions & 14 deletions puppet/modules/apl_test/manifests/camserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,23 @@

class { 'trusted_ca': }
concat { '/ammos/etc/pki/tls/certs/ammos-ca-bundle.crt':
owner => 'root',
group => 'ammos-tls',
mode => '0444',
owner => 'root',
group => 'ammos-tls',
mode => '0444',
require => Package[$cam_main_package], # for owner/group
}
file { '/ammos/etc/pki/tls/certs/ammos-server-cert.pem':
source => $tls_server_cert,
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0444',
source => $tls_server_cert,
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0444',
require => Package[$cam_main_package], # for owner/group
}
file { '/ammos/etc/pki/tls/private/ammos-server-key.pem':
source => $tls_server_key,
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0400',
source => $tls_server_key,
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0400',
require => Package[$cam_main_package], # for owner/group
}
openssl::export::pkcs12 { 'ammos-server-keystore':
Expand Down Expand Up @@ -121,9 +121,9 @@
}
}
file { '/ammos/etc/pki/tls/certs/ammos-truststore.jks':
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0444',
owner => 'cam-srv',
group => 'ammos-tls',
mode => '0444',
}

file { '/ammos/cam-server/server':
Expand Down
Loading