Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release_build_infisical_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- run: pip install --upgrade cloudsmith-cli
- name: Install mkrepo and dependencies
run: pip install mkrepo univers boto3
- name: Install AWS CLI
Expand All @@ -151,9 +150,8 @@ jobs:
env:
APK_PRIVATE_KEY: ${{ secrets.APK_PRIVATE_KEY }}
- name: Publish packages to repositories
run: bash upload_to_cloudsmith.sh
run: bash upload_to_s3.sh
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
INFISICAL_CLI_S3_BUCKET: ${{ secrets.INFISICAL_CLI_S3_BUCKET }}
INFISICAL_CLI_REPO_SIGNING_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_SIGNING_KEY_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -203,3 +201,5 @@ jobs:
POSTHOG_API_KEY_FOR_CLI: ${{ secrets.POSTHOG_API_KEY_FOR_CLI }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}


4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ sudo apt-get install -y infisical
_Alpine:_

```bash
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash
wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sudo sh
sudo apk add infisical
```

_RHEL/CentOS:_

```bash
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sudo -E bash
curl -1sLf 'https://artifacts-cli.infisical.com/setup.rpm.sh' | sudo -E bash
sudo yum install infisical
```

Expand Down
4 changes: 2 additions & 2 deletions npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<a href="https://github.com/Infisical/infisical/issues">
<img src="https://img.shields.io/github/commit-activity/m/infisical/infisical" alt="git commit activity" />
</a>
<a href="https://cloudsmith.io/~infisical/repos/">
<img src="https://img.shields.io/badge/Downloads-6.95M-orange" alt="Cloudsmith downloads" />
<a href="https://github.com/Infisical/cli/releases">
<img src="https://img.shields.io/github/downloads/Infisical/cli/total?color=orange" alt="Downloads" />
</a>
<a href="https://infisical.com/slack">
<img src="https://img.shields.io/badge/chat-on%20Slack-blueviolet" alt="Slack community channel" />
Expand Down
3 changes: 2 additions & 1 deletion scripts/setup/setup.apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ import_rsa_key() {

setup_repository() {
local repo_file="/etc/apk/repositories"
local repo_url="${PKG_URL}/apk/stable/main/${arch}"
# Note: Alpine's apk tool automatically appends /<arch>/APKINDEX.tar.gz to the repo URL
local repo_url="${PKG_URL}/apk/stable/main"

echo_status "RUN" "Adding '${PACKAGE_NAME}' repository..."

Expand Down
45 changes: 21 additions & 24 deletions upload_to_cloudsmith.sh → upload_to_s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ validate_s3_env() {

validate_s3_env

# ============================================
# APK - Upload to Cloudsmith (keep until S3 is validated)
# ============================================
for i in *.apk; do
[ -f "$i" ] || break
cloudsmith push alpine --republish infisical/infisical-cli/alpine/any-version $i
done

# ============================================
# APK - Upload to S3 and generate APKINDEX
# ============================================
Expand All @@ -42,15 +34,29 @@ if ls *.apk 1> /dev/null 2>&1; then
mkdir -p apk-staging/stable/main/x86_64
mkdir -p apk-staging/stable/main/aarch64

# Sort APK files by architecture
# Sort APK files by architecture and rename to Alpine naming convention
# Alpine expects: <pkgname>-<version>.apk (e.g., infisical-0.43.54.apk)
# GoReleaser creates: <pkgname>_<version>_linux_<arch>.apk
for i in *.apk; do
[ -f "$i" ] || break

# Extract package name and version from .PKGINFO inside the APK
pkgname=$(tar -xzf "$i" -O .PKGINFO 2>/dev/null | grep "^pkgname" | cut -d' ' -f3)
pkgver=$(tar -xzf "$i" -O .PKGINFO 2>/dev/null | grep "^pkgver" | cut -d' ' -f3)
Comment thread
victorvhs017 marked this conversation as resolved.

if [ -z "$pkgname" ] || [ -z "$pkgver" ]; then
echo "Error: Failed to extract package info from $i"
exit 1
fi

alpine_filename="${pkgname}-${pkgver}.apk"

if [[ "$i" == *"aarch64"* ]] || [[ "$i" == *"arm64"* ]]; then
echo "Copying $i to aarch64/"
cp "$i" apk-staging/stable/main/aarch64/
echo "Copying $i to aarch64/ as $alpine_filename"
cp "$i" "apk-staging/stable/main/aarch64/${alpine_filename}"
elif [[ "$i" == *"x86_64"* ]] || [[ "$i" == *"amd64"* ]]; then
echo "Copying $i to x86_64/"
cp "$i" apk-staging/stable/main/x86_64/
echo "Copying $i to x86_64/ as $alpine_filename"
cp "$i" "apk-staging/stable/main/x86_64/${alpine_filename}"
else
echo "Warning: Unknown architecture for $i, skipping S3 upload"
fi
Expand All @@ -70,7 +76,6 @@ if ls *.apk 1> /dev/null 2>&1; then
# Note: nFPM-generated APKs don't need individual signatures.
# We only sign the APKINDEX, which contains checksums of all packages.
# Using --allow-untrusted because nFPM packages aren't signed with Alpine tools.
# Cloudsmith also only signs the APKINDEX, not the individual APK files. (https://help.cloudsmith.io/docs/signing-keys)
echo "Generating APKINDEX.tar.gz using Alpine container..."
docker run --rm \
-v "$(pwd)/apk-staging:/repo" \
Expand All @@ -85,9 +90,9 @@ if ls *.apk 1> /dev/null 2>&1; then
arch_dir="$1"
arch_name="$2"

if ls /repo/stable/main/${arch_dir}/*.apk 1> /dev/null 2>&1; then
if ls "/repo/stable/main/${arch_dir}"/*.apk 1> /dev/null 2>&1; then
echo "Processing ${arch_name} packages..."
cd /repo/stable/main/${arch_dir}
cd "/repo/stable/main/${arch_dir}"

# Generate index (--allow-untrusted for nFPM-generated packages)
echo "Generating APKINDEX for ${arch_name}..."
Expand Down Expand Up @@ -116,14 +121,6 @@ for i in *.deb; do
done


# ============================================
# RPM - Upload to Cloudsmith (keep until S3 is validated)
# ============================================
for i in *.rpm; do
[ -f "$i" ] || break
cloudsmith push rpm --republish infisical/infisical-cli/any-distro/any-version $i
done

# ============================================
# RPM - Upload to S3 and regenerate repo metadata
# ============================================
Expand Down