Skip to content

Commit 92694d2

Browse files
committed
Merge branch 'master' of https://github.com/srvrco/getssl
# Conflicts: # getssl - fix for -preferred-chain differed Signed-off-by: Timothe Litt <litt@acm.org>
2 parents 7fe28f8 + 94874a9 commit 92694d2

File tree

150 files changed

+4881
-1077
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+4881
-1077
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# ==========================
2+
# Can test locally using act (https://github.com/nektos/act)
3+
# ==========================
4+
# ./bin/act -s GITHUB_TOKEN=<fine-grained-token> --directory runner --workflows "../.github/workflows/" -e ../payloads.json --no-skip-checkout -j deploy
5+
#
6+
# where payloads.json is:
7+
# {
8+
# "inputs": {
9+
# "tags": "2.47"
10+
# }
11+
# }
12+
#
13+
# ==========================
14+
# Can debug remotely on github actions instance by uncommenting the 'tmate' section below
15+
# ==========================
16+
17+
18+
name: Deploy getssl
19+
20+
on:
21+
workflow_dispatch:
22+
inputs:
23+
tags:
24+
description: 'Tag to deploy, e.g. 2.47'
25+
required: true
26+
type: string
27+
28+
jobs:
29+
deploy:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: prepare
33+
# Keep the outputs persistent outside the docker container to use for the other steps
34+
run: |
35+
mkdir -p ${{ github.workspace }}/bin
36+
mkdir -p ${{ github.workspace }}/debbuild/BUILD
37+
mkdir -p ${{ github.workspace }}/debbuild/DEBS/all
38+
mkdir -p ${{ github.workspace }}/debbuild/SDEBS
39+
mkdir -p ${{ github.workspace }}/debbuild/SOURCES
40+
mkdir -p ${{ github.workspace }}/debbuild/SPECS
41+
mkdir -p ${{ github.workspace }}/rpmbuild/SOURCES
42+
mkdir -p ${{ github.workspace }}/rpmbuild/RPMS/noarch
43+
mkdir -p ${{ github.workspace }}/rpmbuild/RPMS/SRPMS
44+
45+
- name: Checkout
46+
uses: actions/checkout@v3
47+
with:
48+
path: source
49+
50+
- name: Get version number
51+
id: get_version
52+
run: |
53+
echo "VERSION=$(bash ${{ github.workspace }}/source/getssl --version)" >> $GITHUB_OUTPUT
54+
55+
- name: Get release
56+
id: get_release
57+
run: |
58+
echo "RELEASE=$(grep Release source/getssl.spec | awk '{ print $2 }')" >> $GITHUB_OUTPUT
59+
60+
- name: Check version matches tag
61+
run: |
62+
if [ "${{ steps.get_version.outputs.VERSION }}" != "getssl V${{ github.event.inputs.tags }}" ]; then
63+
echo "Version number in getssl (${{ steps.get_version.outputs.VERSION }}) does not match tag (getssl V${{ github.event.inputs.tags }})"
64+
exit 1
65+
fi
66+
67+
- name: build .deb package
68+
id: build_deb
69+
run: |
70+
sudo apt-get update -qq
71+
sudo apt-get install --no-install-recommends -qq -y build-essential devscripts debhelper pax liblocale-gettext-perl wget
72+
wget https://github.com/debbuild/debbuild/releases/download/22.02.1/debbuild_22.02.1-0ubuntu20.04_all.deb
73+
sudo dpkg --install debbuild_22.02.1-0ubuntu20.04_all.deb
74+
# Line 1959 has an extra ")" bracket
75+
sudo chmod +w /usr/bin/debbuild
76+
sudo patch /usr/bin/debbuild < ${GITHUB_WORKSPACE}/source/debbuild.patch
77+
tar --absolute-names -czf ${GITHUB_WORKSPACE}/getssl-${{ github.event.inputs.tags }}.tar.gz ${GITHUB_WORKSPACE}/source/* --transform "s,${GITHUB_WORKSPACE}/source,getssl-${{ github.event.inputs.tags }},"
78+
tar --absolute-names -cf ${GITHUB_WORKSPACE}/debbuild/SDEBS/getssl-${{ github.event.inputs.tags }}.sdeb ${GITHUB_WORKSPACE}/getssl-${{ github.event.inputs.tags }}.tar.gz --transform "s,${GITHUB_WORKSPACE},SOURCES,"
79+
tar --append -f ${GITHUB_WORKSPACE}/debbuild/SDEBS/getssl-${{ github.event.inputs.tags }}.sdeb -C ${GITHUB_WORKSPACE}/source getssl.crontab getssl.logrotate --transform 's,^,SOURCES/,'
80+
tar --append -f ${GITHUB_WORKSPACE}/debbuild/SDEBS/getssl-${{ github.event.inputs.tags }}.sdeb -C ${GITHUB_WORKSPACE}/source getssl.spec --transform 's,^,SPECS/,'
81+
ln -s ${GITHUB_WORKSPACE}/debbuild ${HOME}/debbuild
82+
/usr/bin/debbuild -vv --install ${GITHUB_WORKSPACE}/debbuild/SDEBS/getssl-${{ github.event.inputs.tags }}.sdeb
83+
/usr/bin/debbuild -vv -ba ${GITHUB_WORKSPACE}/debbuild/SPECS/getssl.spec
84+
echo "getssl_deb=${GITHUB_WORKSPACE}/debbuild/DEBS/all/getssl_${{ github.event.inputs.tags }}-${{ steps.get_release.outputs.RELEASE }}_all.deb" >> $GITHUB_OUTPUT
85+
86+
# *** Uncomment this to debug remotely ***
87+
# - name: Setup tmate session
88+
# if: ${{ failure() }}
89+
# uses: mxschmitt/action-tmate@v3
90+
91+
- name: build .rpm package
92+
id: build_rpm
93+
if: ${{ success() }}
94+
uses: addnab/docker-run-action@v3
95+
with:
96+
image: rockylinux:8
97+
options: -v ${{ github.workspace }}:/root -e GITHUB_REF=${{ github.ref }}
98+
run: |
99+
yum install -y rpm-build make
100+
tar -czf /root/rpmbuild/SOURCES/getssl-${{ github.event.inputs.tags }}.tar.gz /root/source/* --transform "s/root\/source\//getssl-${{ github.event.inputs.tags }}\//"
101+
cp /root/source/getssl.crontab /root/rpmbuild/SOURCES
102+
cp /root/source/getssl.logrotate /root/rpmbuild/SOURCES
103+
rpmbuild -ba /root/source/getssl.spec
104+
105+
- name: output .rpm packages
106+
id: output_rpm
107+
if: ${{ success() }}
108+
run: |
109+
echo "getssl_rpm=${GITHUB_WORKSPACE}/rpmbuild/RPMS/noarch/getssl-${{ github.event.inputs.tags }}-${{ steps.get_release.outputs.RELEASE }}.noarch.rpm" >> $GITHUB_OUTPUT
110+
echo "getssl_srpm=${GITHUB_WORKSPACE}/rpmbuild/SRPMS/getssl-${{ github.event.inputs.tags }}-${{ steps.get_release.outputs.RELEASE }}.src.rpm" >> $GITHUB_OUTPUT
111+
112+
- name: create_release
113+
id: create_release
114+
if: ${{ success() }}
115+
uses: ncipollo/release-action@v1
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118+
with:
119+
tag: ${{ github.event.inputs.tags }}
120+
name: Draft Release ${{ github.event.inputs.tags }}
121+
generateReleaseNotes: true
122+
draft: true
123+
prerelease: false
124+
artifacts: |
125+
${{ steps.build_deb.outputs.getssl_deb }}
126+
${{ steps.output_rpm.outputs.getssl_rpm }}
127+
${{ steps.output_rpm.outputs.getssl_srpm }}

.github/workflows/run-tests-pebble.yml

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,104 +6,114 @@ on:
66
branches:
77
- master
88
pull_request:
9+
paths-ignore:
10+
- '.github/workflows/*'
911
branches:
1012
- master
1113
workflow_dispatch:
12-
branches:
13-
- master
14+
schedule:
15+
- cron: '15 3 5 * *'
1416
jobs:
1517
test-alpine:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1921
- name: Build the docker-compose stack
2022
run: docker-compose up -d --build
2123
- name: Run test suite on Alpine
2224
run: test/run-test.sh alpine
2325
test-bash-4-0:
2426
runs-on: ubuntu-latest
2527
steps:
26-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2729
- name: Build the docker-compose stack
2830
run: docker-compose up -d --build
2931
- name: Run test suite on Alpine using Bash 4.0
3032
run: test/run-test.sh bash4-0
3133
test-bash-4-2:
3234
runs-on: ubuntu-latest
3335
steps:
34-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
3537
- name: Build the docker-compose stack
3638
run: docker-compose up -d --build
3739
- name: Run test suite on Alpine using Bash 4.2
3840
run: test/run-test.sh bash4-2
3941
test-bash-5-0:
4042
runs-on: ubuntu-latest
4143
steps:
42-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v3
4345
- name: Build the docker-compose stack
4446
run: docker-compose up -d --build
4547
- name: Run test suite on Alpine using Bash 5
4648
run: test/run-test.sh bash5-0
4749
test-centos6:
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v1
51-
- name: Build the docker-compose stack
52-
run: docker-compose up -d --build
53-
- name: Run test suite on CentOS6
54-
run: test/run-test.sh centos6
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v3
53+
- name: Build the docker-compose stack
54+
run: docker-compose up -d --build
55+
- name: Run test suite on CentOS6
56+
run: test/run-test.sh centos6
5557
test-centos7:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- uses: actions/checkout@v1
59-
- name: Build the docker-compose stack
60-
run: docker-compose up -d --build
61-
- name: Run test suite on CentOS7
62-
run: test/run-test.sh centos7
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v3
61+
- name: Build the docker-compose stack
62+
run: docker-compose up -d --build
63+
- name: Run test suite on CentOS7
64+
run: test/run-test.sh centos7
6365
test-centos8:
6466
runs-on: ubuntu-latest
6567
steps:
66-
- uses: actions/checkout@v1
68+
- uses: actions/checkout@v3
6769
- name: Build the docker-compose stack
6870
run: docker-compose up -d --build
6971
- name: Run test suite on CentOS8
7072
run: test/run-test.sh centos8
7173
test-debian:
7274
runs-on: ubuntu-latest
7375
steps:
74-
- uses: actions/checkout@v1
76+
- uses: actions/checkout@v3
7577
- name: Build the docker-compose stack
7678
run: docker-compose up -d --build
7779
- name: Run test suite on Debian
7880
run: test/run-test.sh debian
7981
test-rockylinux8:
8082
runs-on: ubuntu-latest
8183
steps:
82-
- uses: actions/checkout@v1
84+
- uses: actions/checkout@v3
8385
- name: Build the docker-compose stack
8486
run: docker-compose up -d --build
8587
- name: Run test suite on RockyLinux8
8688
run: test/run-test.sh rockylinux8
8789
test-ubuntu:
8890
runs-on: ubuntu-latest
8991
steps:
90-
- uses: actions/checkout@v1
92+
- uses: actions/checkout@v3
9193
- name: Build the docker-compose stack
9294
run: docker-compose up -d --build
9395
- name: Run test suite on Ubuntu
9496
run: test/run-test.sh ubuntu
97+
test-ubuntu14:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v3
101+
- name: Build the docker-compose stack
102+
run: docker-compose up -d --build
103+
- name: Run test suite on Ubuntu14
104+
run: test/run-test.sh ubuntu14
95105
test-ubuntu16:
96106
runs-on: ubuntu-latest
97107
steps:
98-
- uses: actions/checkout@v1
108+
- uses: actions/checkout@v3
99109
- name: Build the docker-compose stack
100110
run: docker-compose up -d --build
101111
- name: Run test suite on Ubuntu16
102112
run: test/run-test.sh ubuntu16
103113
test-ubuntu18:
104114
runs-on: ubuntu-latest
105115
steps:
106-
- uses: actions/checkout@v1
116+
- uses: actions/checkout@v3
107117
- name: Build the docker-compose stack
108118
run: docker-compose up -d --build
109119
- name: Run test suite on Ubuntu18
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run tests against Staging server using acmedns
2+
on:
3+
push:
4+
paths-ignore:
5+
- '.github/workflows/*'
6+
branches:
7+
- master
8+
pull_request:
9+
paths-ignore:
10+
- '.github/workflows/*'
11+
branches:
12+
- master
13+
workflow_dispatch:
14+
15+
16+
env:
17+
DYNU_API_KEY: ${{ secrets.DYNU_API_KEY == '' && '65cXefd35XbYf36546eg5dYcZT6X52Y2' || secrets.DYNU_API_KEY }}
18+
19+
jobs:
20+
test-ubuntu-acmedns:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Build the docker-compose stack
25+
run: docker-compose up -d --build
26+
- name: Run test suite on Ubuntu against Staging using acmedns
27+
run: test/run-test.sh ubuntu-acmedns

.github/workflows/run-tests-staging-duckdns.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
name: Run all tests using DuckDNS
1+
name: Run tests against Staging server using DuckDNS
22
on:
3-
push:
4-
paths-ignore:
5-
- '.github/workflows/*'
6-
branches:
7-
- master
8-
pull_request:
9-
branches:
10-
- master
113
workflow_dispatch:
124
branches:
135
- master
@@ -17,15 +9,17 @@ jobs:
179
test-centos7-duckdns:
1810
runs-on: ubuntu-latest
1911
steps:
20-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
2113
- name: Build the docker-compose stack
2214
run: docker-compose up -d --build
2315
- name: Run test suite on CentOS7 against Staging using DuckDNS
2416
run: test/run-test.sh centos7-duckdns
2517
test-ubuntu-duckdns:
2618
runs-on: ubuntu-latest
19+
if: always()
20+
needs: test-centos7-duckdns
2721
steps:
28-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2923
- name: Build the docker-compose stack
3024
run: docker-compose up -d --build
3125
- name: Run test suite on Ubuntu against Staging using DuckDNS

.github/workflows/run-tests-staging-dynu.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
name: Run all tests using Dynu
1+
name: Run tests against Staging server using Dynu
22
on:
3-
push:
4-
paths-ignore:
5-
- '.github/workflows/*'
6-
branches:
7-
- master
8-
pull_request:
9-
branches:
10-
- master
113
workflow_dispatch:
124
branches:
135
- master
@@ -17,15 +9,17 @@ jobs:
179
test-centos7-dynu:
1810
runs-on: ubuntu-latest
1911
steps:
20-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
2113
- name: Build the docker-compose stack
2214
run: docker-compose up -d --build
2315
- name: Run test suite on CentOS7 against Staging using Dynu
2416
run: test/run-test.sh centos7-dynu
2517
test-ubuntu-dynu:
2618
runs-on: ubuntu-latest
19+
if: always()
20+
needs: test-centos7-dynu
2721
steps:
28-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2923
- name: Build the docker-compose stack
3024
run: docker-compose up -d --build
3125
- name: Run test suite on Ubuntu against Staging using Dynu

.github/workflows/shellcheck.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ on:
44
push:
55
paths-ignore:
66
- '.github/workflows/*'
7-
branches: [ master ]
7+
branches:
8+
- master
89
pull_request:
9-
branches: [ master ]
10-
workflow_dispatch:
10+
paths-ignore:
11+
- '.github/workflows/*'
1112
branches:
1213
- master
14+
workflow_dispatch:
1315

1416
jobs:
1517
lint:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1921
- name: Lint check
2022
uses: azohra/shell-linter@latest
2123
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
*.tar.gz
88
*.orig
99
JSON.sh
10+
.vscode/settings.json
11+
push.json
12+
bin/

0 commit comments

Comments
 (0)