Skip to content

Commit eec314f

Browse files
committed
adding instructions on how to consume the codeartifact repository
1 parent 36da3d3 commit eec314f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Customers want a way to reuse stacks or constructs across projects. Packaging st
99
## Pre-requisites
1010
Before using the code sample make sure to implement the following pre-requisites.
1111

12-
* Python: **Follow the [instructions](https://wiki.python.org/moin/BeginnersGuide/Download) for your operating system to install Python.**
12+
* **Python**: *Follow the [instructions](https://wiki.python.org/moin/BeginnersGuide/Download) for your operating system to install Python.*
1313

1414

15-
* Pip: **Follow the [instructions](https://pip.pypa.io/en/stable/cli/pip_install/) for your operating system to install Pip.**
15+
* **Pip**: *Follow the [instructions](https://pip.pypa.io/en/stable/cli/pip_install/) for your operating system to install Pip.*
1616

1717
## Clone this repository
1818

@@ -44,7 +44,7 @@ export GITLAB_REPO_NAME=myuser/cdk-python-module
4444
**Notes:**
4545

4646
* Replace the value of GITLAB_HOST with your self-hosted GitLab instance. You do not need to set that value if you are using gitlab.com
47-
* The GITLAB_REPO_NAME variable is in the format *<OWNER>/<NAMESPACE>/<REPO> ; replace the values before you run the steps.
47+
* The GITLAB_REPO_NAME variable is in the format OWNER/NAMESPACE/REPO ; replace the values before you run the steps.
4848
* In order to use the solution you will define the following environment variables. You can customize the DOMAIN_PREFIX, CODE_ARTIFACT_REPO_NAME, PYTHON_MODULE_NAME and AWS_REGION to meet the needs of your project.
4949

5050
3. Create an AWS CodeArtifact repository on AWS
@@ -125,4 +125,12 @@ cd ./cdk-python-module-gitlab-pipeline
125125
git add .
126126
git commit -am "initial skeleton for cdk python module pipeline"
127127
git push
128-
```
128+
```
129+
130+
## Using the artifact in your development projects
131+
132+
You can set up the Python Pip base URL to point on the CodeArtifact repository. Run the command below to setup the CodeArtifact registry URL and credentials using pip config. The following command will update the system-wide configuration file. To update the current environment configuration file only, replace global with site.
133+
134+
```bash
135+
pip config set global.index-url https://aws:${CODEARTIFACT_AUTH_TOKEN}@${CODE_ARTIFACT_DOMAIN}-${AWS_ACCOUNT_ID}.d.codeartifact.${AWS_REGION}.amazonaws.com/pypi/${CODE_ARTIFACT_REPO_NAME}/simple/
136+
```

0 commit comments

Comments
 (0)