mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-21 12:57:40 +00:00
ci: allow pull requests
disable tests if env secrets are empty - detect emtpy aws token - upload: check for aptly creds
This commit is contained in:
+2
-1
@@ -5,7 +5,8 @@ import os
|
|||||||
try:
|
try:
|
||||||
import boto
|
import boto
|
||||||
|
|
||||||
if 'AWS_SECRET_ACCESS_KEY' in os.environ and 'AWS_ACCESS_KEY_ID' in os.environ:
|
if 'AWS_SECRET_ACCESS_KEY' in os.environ and 'AWS_ACCESS_KEY_ID' in os.environ and \
|
||||||
|
os.environ['AWS_SECRET_ACCESS_KEY'] != "" and os.environ['AWS_ACCESS_KEY_ID'] != "":
|
||||||
s3_conn = boto.connect_s3()
|
s3_conn = boto.connect_s3()
|
||||||
else:
|
else:
|
||||||
print("S3 tests disabled: AWS creds not found in the environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)")
|
print("S3 tests disabled: AWS creds not found in the environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)")
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ if [ "action" = "ci" ] && [ -z "$dist" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$aptly_user" ] || [ -z "$aptly_password" ]; then
|
||||||
|
usage
|
||||||
|
echo Error: please set APTLY_USER and APTLY_PASSWORD
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Publishing version '$version' to $action for $dist...\n"
|
echo "Publishing version '$version' to $action for $dist...\n"
|
||||||
|
|
||||||
upload()
|
upload()
|
||||||
|
|||||||
Reference in New Issue
Block a user