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

images: add workaround for smee-client issue 156 #949

Merged
merged 1 commit into from
Mar 25, 2021
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
8 changes: 8 additions & 0 deletions jenkins-slaves/ansible/data/service/smee-client-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# workaround for building the fix from https://github.com/probot/smee-client/pull/162
# to be removed after the PR ^ is merged and a new smee-client released!!

git clone -b drop-host-header https://github.com/kahowell/smee-client
cd smee-client
npm install
npm run build
4 changes: 3 additions & 1 deletion jenkins-slaves/ansible/data/service/smee.service.sh.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
export NODE_EXTRA_CA_CERTS=/etc/pki/ca-trust/source/anchors/RH-IT-Root-CA.crt
smee -u {{ lookup('env','WEBHOOK_URL') }} -t {{ lookup('env','TARGET_URL') }}
# TODO revert after https://github.com/probot/smee-client/pull/162 is merged and smee-client released!!
# smee -u {{ lookup('env','WEBHOOK_URL') }} -t {{ lookup('env','TARGET_URL') }}
/root/smee-client/bin/smee.js -u {{ lookup('env','WEBHOOK_URL') }} -t {{ lookup('env','TARGET_URL') }}
39 changes: 31 additions & 8 deletions jenkins-slaves/ansible/roles/smee/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,37 @@
- debug: msg="WEBHOOK_URL \"{{ lookup('env','WEBHOOK_URL') }}\""
- debug: msg="TARGET_URL \"{{ lookup('env','TARGET_URL') }}\""

- name: Install Smee Client
npm:
name: smee-client
version: 1.1.0
global: yes
production: yes
state: present
registry: ${NPM_REGISTRY_URL}
- name: Copy Pulp repos config - RHEL 7
copy:
src: data/config/pulp/pulp-rhel7.repo
dest: /etc/yum.repos.d/pulp.repo
owner: root
group: root
mode: 0644

- name: Install packages - git
yum:
pkg: 'git'
state: latest

# TODO revert after https://github.com/probot/smee-client/pull/162 is merged and smee-client released!!
#- name: Install Smee Client
# npm:
# name: smee-client
# version: 1.1.0
# global: yes
# production: yes
# state: present
# registry: ${NPM_REGISTRY_URL}

- name: Transfer the script
copy:
src: data/service/smee-client-build.sh
dest: /root/
mode: 0777

- name: Build Smee Client from fork
command: bash /root/smee-client-build.sh

- name: Generate smee.service.sh file
template:
Expand Down