Merge pull request #414 from cloudskiff/publish-to-aur

Publish driftctl to Arch user repository
main
Elie 2021-04-14 14:19:20 +02:00 committed by GitHub
commit c091d04acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 0 deletions

View File

@ -125,6 +125,40 @@ jobs:
command: | command: |
VERSION=$(./bin/driftctl_linux_amd64 version) VERSION=$(./bin/driftctl_linux_amd64 version)
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n ${VERSION} ${VERSION} ./bin/ ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n ${VERSION} ${VERSION} ./bin/
publish-aur:
environment:
AUR_GIT: ssh://aur@aur.archlinux.org/driftctl-bin.git
docker:
- image: cimg/base:2020.01
steps:
- checkout
- attach_workspace:
at: ~/project
# Add ssh private key to allow access to AUR repository
# This key is bound to user cloudskiff on AUR
- add_ssh_keys:
fingerprints:
- "ba:05:09:d6:a6:2a:45:34:89:c4:5e:22:23:22:e8:9f"
- run:
name: Bump package version
command: |
mkdir -p ~/.ssh
echo 'aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN' >> ~/.ssh/known_hosts
# Ensure ssh is properly configured
ssh aur@aur.archlinux.org list-repos
git clone "${AUR_GIT}" driftctl-bin
cd driftctl-bin
git config user.name "cloudskiff"
git config user.email tech@cloudskiff.com
cp ~/project/bin/driftctl_SHA256SUMS .
./bump.sh "${CIRCLE_TAG}"
echo "--- PKGBUILD ---"
cat PKGBUILD
echo "--- .SRCINFO ---"
cat .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Updated to version ${CIRCLE_TAG}"
git push
update-lambda: update-lambda:
executor: aws-cli/default executor: aws-cli/default
environment: environment:
@ -212,6 +246,14 @@ workflows:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/
- publish-aur:
requires:
- release
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- update-lambda: - update-lambda:
context: driftctl-version-lambda context: driftctl-version-lambda
requires: requires:

View File

@ -26,6 +26,13 @@
:warning: <strong>This tool is still in beta state and will evolve in the future with potential breaking changes</strong> :warning: :warning: <strong>This tool is still in beta state and will evolve in the future with potential breaking changes</strong> :warning:
</p> </p>
<details>
<summary>Packaging status</summary>
<a href="https://repology.org/project/driftctl/versions">
<img src="https://repology.org/badge/vertical-allrepos/driftctl.svg" alt="Packaging status">
</a>
</details>
## Why driftctl ? ## Why driftctl ?
Infrastructure drift is a blind spot and a source of potential security issues. Infrastructure drift is a blind spot and a source of potential security issues.