Skip to content

Commit c9e4612

Browse files
authored
Merge pull request #389 from gerrod3/template-update-and-docs-move
Update template config and publish docs to pulpproject.org
2 parents e366502 + 39e4eec commit c9e4612

29 files changed

+772
-426
lines changed

.ci/ansible/settings.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ANSIBLE_API_HOSTNAME = "http://pulp:80"
33
ANSIBLE_CONTENT_HOSTNAME = "http://pulp:80/pulp/content"
44
PRIVATE_KEY_PATH = "/etc/pulp/certs/token_private_key.pem"
55
PUBLIC_KEY_PATH = "/etc/pulp/certs/token_public_key.pem"
6-
TOKEN_SERVER = "http://pulp:80/token"
6+
TOKEN_SERVER = "http://pulp:80/token/"
77
TOKEN_SIGNATURE_ALGORITHM = "ES256"
88

99
{% if pulp_settings %}

.ci/scripts/cherrypick.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
# WARNING: DO NOT EDIT!
4+
#
5+
# This file was generated by plugin_template, and is managed by it. Please use
6+
# './plugin-template --github pulp_python' to update this file.
7+
#
8+
# For more info visit https://github.com/pulp/plugin_template
9+
10+
set -e
11+
12+
if [ $# -lt 3 ]
13+
then
14+
echo "Usage: .ci/scripts/cherrypick.sh [commit-hash] [original-issue-id] [backport-issue-id]"
15+
echo " ex: .ci/scripts/cherrypick.sh abcd1234 1234 4567"
16+
echo ""
17+
echo "Note: make sure you are on a fork of the release branch before running this script."
18+
exit
19+
fi
20+
21+
commit="$(git rev-parse $1)"
22+
issue="$2"
23+
backport="$3"
24+
commit_message=$(git log --format=%B -n 1 $commit)
25+
26+
if ! echo $commit_message | tr '[:upper:]' '[:lower:]' | grep -q "\[noissue\]"
27+
then
28+
if ! echo $commit_message | tr '[:upper:]' '[:lower:]' | grep -q -E "(fixes|closes).*#$issue"
29+
then
30+
echo "Error: issue $issue not detected in commit message." && exit 1
31+
fi
32+
fi
33+
34+
if [ "$4" = "--continue" ]
35+
then
36+
echo "Continue after manually resolving conflicts..."
37+
elif [ "$4" = "" ]
38+
then
39+
if ! git cherry-pick --no-commit "$commit"
40+
then
41+
echo "Please resolve and add merge conflicts and restart this command with appended '--continue'."
42+
exit 1
43+
fi
44+
else
45+
exit 1
46+
fi
47+
48+
for file in $(find CHANGES -name "$issue.*")
49+
do
50+
newfile="${file/$issue/$backport}"
51+
git mv "$file" "$newfile"
52+
sed -i -e "\$a (backported from #$issue)" "$newfile"
53+
git add "$newfile"
54+
done
55+
56+
commit_message="$(printf "$commit_message" | sed -E 's/(fixes|closes)/backports/i')"
57+
commit_message="$commit_message
58+
59+
fixes #$backport
60+
61+
(cherry picked from commit $commit)"
62+
git commit -m "$commit_message"
63+
64+
printf "\nSuccessfully backported commit $1.\n"

.ci/scripts/publish_plugin_pypi.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.ci/scripts/redmine.py

100644100755
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212

1313
REDMINE_API_KEY = os.environ["REDMINE_API_KEY"]
1414
REDMINE_QUERY_URL = sys.argv[1]
15+
MILESTONE_URL = sys.argv[2]
16+
RELEASE = sys.argv[3]
1517
CLOSED_CURRENTRELEASE = 11
1618

1719
redmine = Redmine(REDMINE_QUERY_URL.split("issues")[0], key=REDMINE_API_KEY)
1820
query_issues = REDMINE_QUERY_URL.split("=")[-1].split(",")
21+
milestone_name = redmine.version.get(MILESTONE_URL.split("/")[-1].split(".")[0]).name
22+
if milestone_name != RELEASE:
23+
raise RuntimeError(f"Milestone name, '{milestone_name}', does not match version, '{RELEASE}'.")
1924

2025
to_update = []
2126
for issue in query_issues:

.ci/scripts/release.py

Lines changed: 0 additions & 138 deletions
This file was deleted.

.ci/scripts/update_redmine.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ echo "Releasing $RELEASE"
2121
echo "Milestone URL: $MILESTONE_URL"
2222
echo "Query: $REDMINE_QUERY_URL"
2323

24-
MILESTONE=$(http $MILESTONE_URL | jq -r .version.name)
25-
echo "Milestone: $MILESTONE"
24+
pip install python-redmine httpie
2625

27-
if [[ "$MILESTONE" != "${RELEASE%.post*}" ]]; then
28-
echo "Milestone $MILESTONE is not equal to Release $RELEASE"
29-
exit 1
30-
fi
31-
32-
pip install python-redmine
33-
python3 .ci/scripts/redmine.py $REDMINE_QUERY_URL
26+
python3 .ci/scripts/redmine.py $REDMINE_QUERY_URL $MILESTONE_URL $RELEASE

.ci/scripts/validate_commit_message.py

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66
# For more info visit https://github.com/pulp/plugin_template
77

88
import re
9-
109
import subprocess
1110
import sys
1211
from pathlib import Path
1312

13+
1414
from github import Github
1515

16-
KEYWORDS = ["fixes", "closes"]
16+
1717
NO_ISSUE = "[noissue]"
1818
CHANGELOG_EXTS = [".feature", ".bugfix", ".doc", ".removal", ".misc", ".deprecation"]
1919

20+
21+
KEYWORDS = ["fixes", "closes"]
22+
2023
sha = sys.argv[1]
2124
message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8")
22-
2325
g = Github()
2426
repo = g.get_repo("pulp/pulp_python")
2527

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
pull_request:
1111
branches:
1212
- '*'
13-
push:
14-
branches:
15-
- '*'
1613

1714
jobs:
1815

@@ -99,6 +96,13 @@ jobs:
9996
ANSIBLE_FORCE_COLOR: '1'
10097
shell: bash
10198

99+
- name: Install Python client
100+
run: .github/workflows/scripts/install_python_client.sh
101+
102+
- name: Install Ruby client
103+
if: ${{ env.TEST == 'bindings' }}
104+
run: .github/workflows/scripts/install_ruby_client.sh
105+
102106
- name: Before Script
103107
run: |
104108
.github/workflows/scripts/before_script.sh

.github/workflows/fips.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)