Skip to content

Commit

Permalink
feat(codeartifact): ✨ Add a few new codeartifact interrogation commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguest75 committed May 9, 2024
1 parent 309c50c commit 2f7e33f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion 33_awscli/CODEARTIFACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,26 @@ name = "privatecodeartifact"
my_library = {version="1.2.3", index="privatecodeartifact"}
```

## Interrogate

```sh
# describe repository metadata
aws codeartifact describe-repository --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_OWNER --repository ${CODEARTIFACT_REPOSITORY}

# list packages in a repository
aws codeartifact list-packages --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_OWNER --repository ${CODEARTIFACT_REPOSITORY}

# get versions of a package
aws codeartifact list-package-versions --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_OWNER --repository ${CODEARTIFACT_REPOSITORY} --package codeartifact_test_package --format pypi

# get dependencies
aws codeartifact list-package-version-dependencies --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_OWNER --repository ${CODEARTIFACT_REPOSITORY} --package codeartifact_test_package --format pypi --package-version 0.0.2
```

## Resoures

* AWS CodeArtifact concepts [here](https://docs.aws.amazon.com/codeartifact/latest/ug/codeartifact-concepts.html)
* codeartifact awscli [here](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codeartifact/index.html)
* How to Import Private Python Packages with pipenv and Gitlab [here](https://medium.com/@matt_tich/how-to-use-private-python-packages-with-pipenv-and-gitlab-8d35f73e5329)
* Using CodeArtifact as Pypi mirror for Pipenv [gist](https://gist.github.com/smparekh/a2bf43e514f65b920c8ca8fb55aaefbb)
* Injecting credentials into Pipfile via environment variables [here](https://pipenv.pypa.io/en/latest/credentials.html)
* Injecting credentials into Pipfile via environment variables [here](https://pipenv.pypa.io/en/latest/credentials.html)

0 comments on commit 2f7e33f

Please sign in to comment.