Skip to content

Commit

Permalink
Install topaz in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh committed Nov 22, 2024
1 parent ae88e78 commit ba72d39
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
pull_request:

env:
GH_TOKEN: ${{ github.token }}
HELM_VERSION: v3.14.4
PYTHON_VERSION: 3.13
POSTGRES_PASSWORD: postgres
UV_VERSION: 0.5.3
TOPAZ_VERSION: 0.32.36

jobs:
lint:
Expand Down Expand Up @@ -37,34 +40,32 @@ jobs:
-
name: Lint
run: |
ct lint --config ct.yaml --helm-repo-extra-args "aserto-helm=-u gh -p ${READ_WRITE_TOKEN}"
ct lint --config ct.yaml --helm-repo-extra-args "aserto-helm=-u gh -p ${{ secrets.GITHUB_TOKEN }}"
test:
runs-on: ubuntu-latest
env:
POSTGRES_PASSWORD: postgres
steps:
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
uses: actions/checkout@v4
-
name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
# -
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# check-latest: true
-
name: Install topaz CLI
run: |
gh release download v${{env.TOPAZ_VERSION}} --repo aserto-dev/topaz --pattern "topaz_linux_x86_64.zip" \
--output ./ext/topaz.zip --clobber
unzip ./ext/topaz.zip -d bin
chmod +x ./bin/topaz
./bin/topaz version
echo "TOPAZ=./bin/topaz" >> "$GITHUB_ENV"
-
name: Install topazd container
run: |
${TOPAZ} install --container-tag=${{ env.TOPAZ_VERSION }}
${TOPAZ} version
-
name: Install uv package manager
uses: astral-sh/setup-uv@v3
Expand Down Expand Up @@ -94,11 +95,11 @@ jobs:
name: Generate admin ssh key
id: sshkey
run: |
ssh-keygen -t ed25519 -N "" -f $HOME/.ssh/admin_ed25519
echo "public_key=$HOME/.ssh/admin_ed25519.pub" >> $GITHUB_OUTPUT
echo "private_key=$HOME/.ssh/admin_ed25519" >> $GITHUB_OUTPUT
ssh-keygen -t ed25519 -N "" -f ${HOME}/.ssh/admin_ed25519
echo "public_key=${HOME}/.ssh/admin_ed25519.pub" >> "$GITHUB_OUTPUT"
echo "private_key=${HOME}/.ssh/admin_ed25519" >> "$GITHUB_OUTPUT"
cat << EOF > $HOME/.ssh/config
cat << EOF > ${HOME}/.ssh/config
Host localhost
StrictHostKeyChecking no
EOF
Expand All @@ -108,7 +109,7 @@ jobs:
name: Test Directory
timeout-minutes: 10
env:
GITHUB_TOKEN: ${{ env.READ_WRITE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_PUBLIC_KEY: ${{ steps.sshkey.outputs.public_key }}
SSH_PRIVATE_KEY: ${{ steps.sshkey.outputs.private_key }}
run: |
Expand Down

0 comments on commit ba72d39

Please sign in to comment.