Skip to content

Commit

Permalink
Merge branch 'master' into delete.jenkins.node
Browse files Browse the repository at this point in the history
  • Loading branch information
karianna committed May 15, 2024
2 parents 225ed95 + ff43196 commit b2da430
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 73 deletions.
66 changes: 40 additions & 26 deletions ansible/DockerInventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
{
"nodeName": "test-docker-ubuntu2204-x64-2",
"port": "32778"
},
{
"nodeName": "test-docker-ubuntu2404-x64-1",
"port": "32782"
}
],
"containersCount": 6
"containersCount": 7
},
{
"name": "dockerhost-azure-ubuntu2204-x64-2",
Expand All @@ -42,6 +46,10 @@
"nodeName": "test-docker-alpine319-x64-3",
"port": "32771"
},
{
"nodeName": "test-docker-amazon2023-x64-1",
"port": "32776"
},
{
"nodeName": "test-docker-debian12-x64-3",
"port": "32770"
Expand All @@ -52,7 +60,7 @@
},
{
"nodeName": "test-docker-ubuntu2004-x64-4",
"port": "32768"
"port": "32775"
},
{
"nodeName": "test-docker-ubuntu2204-x64-6",
Expand All @@ -63,7 +71,7 @@
"port": "32772"
}
],
"containersCount": 7
"containersCount": 8
},
{
"name": "dockerhost-equinix-ubuntu2004-armv8-1",
Expand All @@ -77,6 +85,14 @@
"nodeName": "test-docker-alpine319-armv8-4",
"port": "32777"
},
{
"nodeName": "test-docker-amazon2023-armv8l-1",
"port": "32779"
},
{
"nodeName": "test-docker-debian12-armv7l-1",
"port": "32778"
},
{
"nodeName": "test-docker-fedora39-armv8l-1",
"port": "2234"
Expand Down Expand Up @@ -122,7 +138,7 @@
"port": "32776"
}
],
"containersCount": 13
"containersCount": 15
},
{
"name": "dockerhost-equinix-ubuntu2204-armv8-1",
Expand Down Expand Up @@ -167,9 +183,17 @@
{
"nodeName": "test-docker-ubuntu2204-armv8-3",
"port": "32771"
},
{
"nodeName": "test-docker-ubuntu2404-armv7l-1",
"port": "32774"
},
{
"nodeName": "test-docker-ubuntu2404-armv8-1",
"port": "32773"
}
],
"containersCount": 10
"containersCount": 12
},
{
"name": "dockerhost-marist-ubuntu2204-s390x-1",
Expand All @@ -182,9 +206,13 @@
{
"nodeName": "test-docker-sles15-s390x-1",
"port": "32768"
},
{
"nodeName": "test-docker-ubuntu2404-s390x-1",
"port": "32770"
}
],
"containersCount": 2
"containersCount": 3
},
{
"name": "dockerhost-osuosl-ubuntu2004-ppc64le-1",
Expand Down Expand Up @@ -224,12 +252,6 @@
],
"containersCount": 2
},
{
"name": "dockerhost-rise-ubuntu2204-aarch64-1",
"ip": "34.72.108.242",
"containers": [],
"containersCount": 0
},
{
"name": "dockerhost-skytap-ubuntu2004-ppc64le-1",
"ip": "20.61.136.212",
Expand Down Expand Up @@ -257,9 +279,13 @@
{
"nodeName": "test-docker-ubuntu2204-ppc64le-2",
"port": "32772"
},
{
"nodeName": "test-docker-ubuntu2404-ppc64le-1",
"port": "32774"
}
],
"containersCount": 6
"containersCount": 7
},
{
"name": "dockerhost-skytap-ubuntu2204-x64-1",
Expand All @@ -269,27 +295,15 @@
"nodeName": "test-docker-alpine319-x64-1",
"port": "32787"
},
{
"nodeName": "test-docker-centos7-x64-1",
"port": "32782"
},
{
"nodeName": "test-docker-debian12-x64-1",
"port": "32778"
},
{
"nodeName": "test-docker-fedora39-x64-1",
"port": "32779"
},
{
"nodeName": "test-docker-ubi8-x64-3",
"port": "32790"
},
{
"nodeName": "test-docker-ubuntu2004-x64-3",
"port": "32783"
}
],
"containersCount": 6
"containersCount": 3
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM amazonlinux:2023

RUN dnf -y update && dnf install -y perl openssh-server unzip zip wget tar
RUN dnf install -y --allowerasing gnupg2
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -P ""
# Get latest jdk21 ga
RUN wget -q 'https://api.adoptium.net/v3/binary/latest/21/ga/linux/x64/jdk/hotspot/normal/eclipse?project=jdk' -O /tmp/jdk21.tar.gz
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 3B04D753C9050D9A5D343F39843C48A565F8F04B
# Get sig file for latest jdk21 ga
RUN wget -q `curl -s 'https://api.adoptium.net/v3/assets/feature_releases/21/ga?architecture=x64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=linux&page=0&page_size=1&project=jdk&vendor=eclipse' | grep signature_link | awk '{split($0,a,"\""); print a[4]}'` -O /tmp/jdk21.sig
RUN gpg --verify /tmp/jdk21.sig /tmp/jdk21.tar.gz
RUN mkdir -p /usr/lib/jvm/jdk21 && tar -xpzf /tmp/jdk21.tar.gz -C /usr/lib/jvm/jdk21 --strip-components=1
# Install ant 1.10.12
RUN wget -q -O /tmp/ant.zip 'https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.12-bin.zip'
RUN wget -q -O /tmp/ant-contrib.tgz https://sourceforge.net/projects/ant-contrib/files/ant-contrib/ant-contrib-1.0b2/ant-contrib-1.0b2-bin.tar.gz
RUN echo "7e6fbcc3563df4bd87c883ad86a161a71da2774e0ed71a1b3aad82cbff1a7656ed9a0acb5ce40652129376dfd79f1ef74ec3369c1067d412a63062fea62ceccd /tmp/ant.zip" > /tmp/ant.sha512
RUN echo "0fd2771dca2b8b014a4cb3246715b32e20ad5d26754186d82eee781507a183d5e63064890b95eb27c091c93c1209528a0b18a6d7e6901899319492a7610e74ad /tmp/ant-contrib.tgz" >> /tmp/ant.sha512
RUN sha512sum --check --strict /tmp/ant.sha512
RUN ln -s /usr/local/apache-ant-1.10.12/bin/ant /usr/bin/ant
RUN unzip -q -d /usr/local /tmp/ant.zip
RUN tar xpfz /tmp/ant-contrib.tgz -C /usr/local/apache-ant-1.10.12/lib --strip-components=2 ant-contrib/lib/ant-contrib.jar
# Clear up space
RUN rm /tmp/jdk21.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz /tmp/jdk21.sig
# Set up jenkins user
RUN useradd -m -d /home/jenkins jenkins
RUN mkdir /home/jenkins/.ssh
RUN echo "Jenkins_User_SSHKey" > /home/jenkins/.ssh/authorized_keys
RUN chown -R jenkins /home/jenkins/.ssh
RUN chmod -R og-rwx /home/jenkins/.ssh
# RUN service ssh start
CMD ["/usr/sbin/sshd","-D"]
RUN dnf install -y --allowerasing git curl make gcc xorg-x11-server-Xvfb libXrender libXi libXtst procps glibc-langpack-en fontconfig which hostname fakeroot shared-mime-info
# Install Packages For openssl
RUN dnf -y update && dnf install -y openssl gnutls gnutls-utils nss-devel nss-tools
# ENTRYPOINT /usr/lib/jvm/jdk21/bin/java
EXPOSE 22
# Start with docker run -p 2222:22 UUID
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,29 @@
###############
# WiX Toolset #
###############
- name: Test if WiX is already installed
win_stat:
path: 'C:\Program Files (x86)\WiX Toolset v3.14\bin\wix.dll'
register: wix_installed
tags: Wix

- name: Download WiX
win_get_url:
url: https://github.com/wixtoolset/wix3/releases/download/wix314rtm/wix314.exe
dest: 'C:\temp\wix.exe'
follow_redirects: all
checksum: 704439ea88fc9e5a3647eedeeb45943f9a392e3d209f58512280130096847937
checksum_algorithm: sha256
when: (not wix_installed.stat.exists)
tags: Wix

- name: Install WiX
win_package:
path: 'C:\temp\wix.exe'
product_id: WiX
arguments: /S
when: (not wix_installed.stat.exists)
- name: Set Wix version variable
set_fact:
wix_version: 5.0.0
tags: Wix

- name: Cleanup WiX
win_file:
path: 'C:\temp\wix.exe'
state: absent
failed_when: false
tags: Wix

- name: Test if Windows 10 SDK is already installed
- name: Test if WiX is already installed
win_stat:
path: 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool.exe'
register: win10_sdk_installed
tags: Wix

- name: Download Windows-SDK-10.1.17763.1
win_get_url:
url: https://download.microsoft.com/download/9/3/9/939441D4-6FBA-48EE-9EF7-402C1AA8B8A7/windowssdk/winsdksetup.exe
dest: C:/temp/winSDK10.exe
when: not win10_sdk_installed.stat.exists
path: 'C:\\Users\{{ Jenkins_Username }}\.dotnet/tools/wix'
register: wix_installed
tags: Wix

- name: Install Windows-SDK-10.1.17763.1
win_shell: C:/temp/winSDK10.exe /q /norestart
when: not win10_sdk_installed.stat.exists
- name: Test WiX version
# generates an output like 5.0.0+41e11442
win_shell: wix --version
register: installed_wix_version
become_user: "{{ Jenkins_Username }}"
become: true
when: wix_installed.stat.exists
tags: Wix

- name: Reboot to complete installation
win_reboot:
reboot_timeout: 1800
when: not win10_sdk_installed.stat.exists
- name: Install Wix Toolset when not installed or version is not correct
win_shell: dotnet tool install --global wix --version {{ wix_version }}
become_user: "{{ Jenkins_Username }}"
become: true
when: (not wix_installed.stat.exists) or (installed_wix_version.stdout.find(wix_version) == -1)
tags: Wix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
- name: Create 8dot3 shortnames
script: scripts/shortName.ps1 "{{ item.name }}" "{{ item.shortname }}"
with_items:
- {name: "WiX Toolset v3.14", shortname: "WIXTOO~1.14"}
- {name: "Microsoft Visual Studio", shortname: "MIB055~1"}
- {name: "Microsoft Visual Studio 9.0", shortname: "MICROS~2.0"}
- {name: "Microsoft Visual Studio 10.0", shortname: "MICROS~3.0"}
Expand Down

0 comments on commit b2da430

Please sign in to comment.