Extract common test bash functions. Extract s3 publishing