Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Feb 27, 2024
1 parent c1c600a commit af3e36c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,24 @@ jobs:
run: |
cd deploy
terraform output -raw instance-id
- name: Re-configure providers access
env:
MYTOKEN: ${{ secrets.MYTOKEN }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
run: |
OIDC_TOKEN=$(curl -X POST "https://aai.egi.eu/auth/realms/egi/protocol/openid-connect/token" \
-d "grant_type=refresh_token&refresh_token=$REFRESH_TOKEN&client_id=token-portal&scope=openid%20email%20profile%20voperson_id%20eduperson_entitlement" \
| jq -r ".access_token")
echo "::add-mask::$OIDC_TOKEN"
cd deploy
BACKEND_SITE="$(yq -r .clouds.backend.site clouds.yaml)"
BACKEND_VO="$(yq -r .clouds.backend.vo clouds.yaml)"
BACKEND_OS_TOKEN="$(fedcloud openstack token issue --oidc-access-token "$OIDC_TOKEN" \
--site "$BACKEND_SITE" --vo "$BACKEND_VO" -j | jq -r '.[0].Result.id')"
echo "::add-mask::$BACKEND_OS_TOKEN"
sed -i -e "s/backend_secret/$BACKEND_OS_TOKEN/" clouds.yaml
mkdir -p ~/.config/openstack
touch ~/.config/openstack/secure.yaml
- name: Get the status file from swift
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: nick-fields/retry@v3
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,3 @@ jobs:
- name: Validate GOC and VOs
run: |
./validate.sh
- name: Check all VOs are in the deployment dir
run: |
for f in sites/*.yaml; do
for vo in $(yq -r ".vos[].name" < "$f"); do
# remove FQAN stuff
# shellcheck disable=SC2001
vo=$(echo "$vo" | sed 's#/\([^/]*\)/.*#\1#')
grep "$vo" deploy/vos.yaml > /dev/null || (echo "VO $vo not configured" ; exit 1)
done
done

0 comments on commit af3e36c

Please sign in to comment.