Skip to content

Commit fbe9a1a

Browse files
pulpbotmdellweg
authored andcommitted
Update CI files
[noissue]
1 parent cf4db6e commit fbe9a1a

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

.ci/scripts/tweet.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
import sys
3+
from tweepy import Client
4+
5+
release_version = sys.argv[1]
6+
if release_version.endswith(".0"):
7+
client = Client(
8+
consumer_key=os.getenv("TWITTER_API_KEY"),
9+
consumer_secret=os.getenv("TWITTER_API_KEY_SECRET"),
10+
access_token=os.getenv("TWITTER_ACCESS_TOKEN"),
11+
access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"),
12+
)
13+
link = "https://docs.pulpproject.org/pulpcore/changes.html"
14+
msg = f"pulpcore-{release_version} - Check out for more details: {link}"
15+
release_msg = f"Hey! We've just released {msg}"
16+
client.create_tweet(text=release_msg)

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-158-gb7cc708
1+
2021.08.26-160-g672272f

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ jobs:
292292
- name: Install python dependencies
293293
run: |
294294
echo ::group::PYDEPS
295-
pip install gitpython python-redmine requests packaging
295+
pip install gitpython python-redmine requests packaging tweepy
296296
echo ::endgroup::
297297
298298
- name: Push branch and tag to GitHub
@@ -347,6 +347,10 @@ jobs:
347347
echo "GH Issues $GH_ISSUES"
348348
python .ci/scripts/update_github.py
349349
350+
- name: Tweet
351+
continue-on-error: true
352+
run: python .ci/scripts/tweet.py ${{ github.event.inputs.release }}
353+
350354
- name: Create release on GitHub
351355
run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }}
352356

.github/workflows/scripts/before_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if [ -n "$PULP_CLI_PR_NUMBER" ]; then
106106
fi
107107

108108
cd pulp-cli
109-
pip install -e .
109+
pip install .
110110
pulp config create --base-url https://pulp --location tests/cli.toml
111111
mkdir ~/.config/pulp
112112
cp tests/cli.toml ~/.config/pulp/cli.toml

0 commit comments

Comments
 (0)