Comments (4)
It doesn't look like the call to the gitlab api is working. Here is what I did for python3.
elif hostflavour == 'gitlab':
# https://gitlab.com/jaymcconnell/gitlab-test-30/repository/archive.zip?ref=master
print(event['body-json']['project']['http_url'])
archive_root = event['body-json']['project']['http_url'].strip('.git')
project_id = event['body-json']['project_id']
branch = event['body-json']['ref'].replace('refs/heads/', '')
archive_url = f"https://gitlab.com/api/v4/projects/{project_id}/repository/archive.zip"
params = {'private_token': OAUTH_token, 'ref': 'branch'}
owner = event['body-json']['project']['namespace']
name = event['body-json']['project']['name']
r = requests.get(archive_url, verify=verify, headers=headers, params=params)
from quickstart-git2s3.
Thanks for posting the fix @josjaf would you be willing to put in a pr ? Also happy to put it in the patch on your behalf if you'd prefer.
from quickstart-git2s3.
I'll send over a PR at some point. 'branch' needs to be branch - variable instead of string
params = {'private_token': OAUTH_token, 'sha': branch}
ref is not longer used.
from quickstart-git2s3.
In case somebody has Gitlab CE on his own servers and wants to use this quick start it is just needed to modify archive_url
to reflect the url of the custom Gitlab CE.
archive_url = f"https://GITLAB_CE_URL/api/v4/projects/{project_id}/repository/archive.zip"
I am surprised that this is not parameterized already by AWS team...
from quickstart-git2s3.
Related Issues (20)
- Gitlab Project Id HOT 1
- local variable 'params' referenced before assignment HOT 1
- Zip destination different to documentation HOT 1
- Not able to fetch the commit id inside my lambda_fuction
- GitError: failed to resolve address for git.xxxxxx.com: No address associated with hostname HOT 1
- Can't pull master using Git Pull Endpoint and BitBucket HOT 1
- GitLab: The project you were looking for could not be found.
- Upgrade CopyZips from Python 2.7 to 3.x HOT 2
- Update other lambdas to 3.x HOT 1
- Fix 'branch' in zipdl Lambda code
- Facing issue when I'm using SecurityGroupIds and SubnetIds. HOT 1
- GitPullLambda "No space left on device" HOT 1
- Deployment guide doesn't show how to replicate a github repo into an s3 location with this? HOT 4
- git pull with HTTPS HOT 1
- Unable to find template file HOT 1
- CI/CD pipeline HOT 1
- Configuring AWS services HOT 1
- S3 error: The specified key does not exist.
- Python 3.7 reached end of Life
- Issue regarding git2s3 connectivity with GIT in prd env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickstart-git2s3.