Skip to content

Commit

Permalink
Use generated join key instead of secret one
Browse files Browse the repository at this point in the history
Echo the system.yaml file for debugging
  • Loading branch information
alexhung committed Jul 8, 2024
1 parent dd7ab10 commit c9a89b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ jobs:
run: |
mkdir -p ${{ runner.temp }}/artifactory/extra_conf
mkdir -p ${{ runner.temp }}/artifactory/var/etc
ARTIFACTORY_JOIN_KEY=$(openssl rand -hex 32)
echo "::add-mask::$ARTIFACTORY_JOIN_KEY"
echo "ARTIFACTORY_JOIN_KEY=$ARTIFACTORY_JOIN_KEY" >> "$GITHUB_ENV"
echo $ARTIFACTORY_LICENSE > ${{ runner.temp }}/artifactory/extra_conf/artifactory.lic
cat ${{ github.workspace }}/scripts/system.yaml | yq '.shared += {"security": {"joinKey": "${{ secrets.ARTIFACTORY_JOIN_KEY }}"}}' > ${{ runner.temp }}/artifactory/var/etc/system.yaml
cat ${{ github.workspace }}/scripts/system.yaml | yq '.shared += {"security": {"joinKey": "$ARTIFACTORY_JOIN_KEY"}}' > ${{ runner.temp }}/artifactory/var/etc/system.yaml
echo ${{ runner.temp }}/artifactory/var/etc/system.yaml
sudo chown -R 1030:1030 ${{ runner.temp }}/artifactory/var
mkdir -p ${{ runner.temp }}/artifactory-2/extra_conf
mkdir -p ${{ runner.temp }}/artifactory-2/var/etc
echo $ARTIFACTORY_LICENSE > ${{ runner.temp }}/artifactory-2/extra_conf/artifactory.lic
cat ${{ github.workspace }}/scripts/system.yaml | yq '.shared += {"security": {"joinKey": "${{ secrets.ARTIFACTORY_JOIN_KEY }}"}}' > ${{ runner.temp }}/artifactory-2/var/etc/system.yaml
cat ${{ github.workspace }}/scripts/system.yaml | yq '.shared += {"security": {"joinKey": "$ARTIFACTORY_JOIN_KEY"}}' > ${{ runner.temp }}/artifactory-2/var/etc/system.yaml
sudo chown -R 1030:1030 ${{ runner.temp }}/artifactory-2/var
- name: Run Artifactory container
id: run_artifactory_container
Expand Down

0 comments on commit c9a89b2

Please sign in to comment.