Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[after branch cut] [stable-4.10] Cut stable-4.10 #5127

Closed
wants to merge 19 commits into from
Closed
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
131 changes: 0 additions & 131 deletions .github/dependabot.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/labeler.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/patchback.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Automerge

on:
pull_request_target:
branches: [ 'master', 'stable-*' ]
branches: [ 'stable-*' ]

jobs:
automerge:
Expand Down
77 changes: 13 additions & 64 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ on:
# allow running manually
workflow_dispatch:
pull_request:
branches: [ 'master', 'stable-*' ]
branches: [ 'stable-*' ]
push:
branches: [ 'master', 'stable-*' ]
# daily on master
schedule:
- cron: '30 5 * * *'
branches: [ 'stable-*' ]

concurrency:
group: cypress-${{ github.ref }}
Expand All @@ -19,8 +16,8 @@ jobs:
cypress:
runs-on: ubuntu-latest
env:
# base of a PR, or pushed-to branch outside PRs, or master
BRANCH: ${{ github.base_ref || github.ref || 'refs/heads/master' }}
# base of a PR, or pushed-to branch outside PRs, or stable-4.10
BRANCH: ${{ github.base_ref || github.ref || 'refs/heads/stable-4.10' }}

strategy:
fail-fast: false
Expand All @@ -29,7 +26,6 @@ jobs:
- 'approval'
- 'approval-modal'
- 'collections'
- 'community'
- 'namespaces'
- 'repo'
- 'screenshots'
Expand All @@ -47,25 +43,12 @@ jobs:
# pip install git+https://github.com/ansible/galaxykit.git@branch_name
pip install git+https://github.com/ansible/galaxykit.git

- name: "Set env.SHORT_BRANCH, BACKEND_FLAVOR"
- name: "Set env.SHORT_BRANCH"
run: |
SHORT_BRANCH=`sed 's/^refs\/heads\///' <<< $BRANCH`

case "${{ matrix.test }}" in
community*)
BACKEND_FLAVOR=community
API=api
;;
*)
BACKEND_FLAVOR=standalone
API=api/galaxy
;;
esac

echo "BACKEND_FLAVOR=${BACKEND_FLAVOR}" >> $GITHUB_ENV
echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV
echo "SHORT_BRANCH=${SHORT_BRANCH}" >> $GITHUB_ENV
echo "API=${API}" >> $GITHUB_ENV

- name: "Set variables for screenshots"
if: matrix.test == 'screenshots'
Expand Down Expand Up @@ -96,8 +79,7 @@ jobs:
run: |
pip install --editable ./client/
# merge common, profile-specific and test matrix specific config
cat ../ansible-hub-ui/.github/workflows/cypress/compose.env.common \
../ansible-hub-ui/.github/workflows/cypress/compose.env."$BACKEND_FLAVOR" \
cat ../ansible-hub-ui/.github/workflows/cypress/compose.env \
../ansible-hub-ui/test/cypress/e2e/"${{ matrix.test }}"/compose.env \
| sed 's/^\s\+//' | tee compose.env || [ -s compose.env ]

Expand Down Expand Up @@ -145,7 +127,6 @@ jobs:
npm run gettext:compile

- name: "Build standalone UI"
if: ${{ env.BACKEND_FLAVOR == 'standalone' }}
working-directory: 'ansible-hub-ui'
run: |
npm run build-standalone
Expand All @@ -154,18 +135,7 @@ jobs:
BUILD_HASH=`ls dist/js/App*js | cut -d. -f2`
echo "BUILD_HASH=${BUILD_HASH}" >> $GITHUB_ENV

- name: "Build community UI"
if: ${{ env.BACKEND_FLAVOR == 'community' }}
working-directory: 'ansible-hub-ui'
run: |
npm run build-community

# save the App.*.js hash for later verification
BUILD_HASH=`ls dist/js/App*js | cut -d. -f2`
echo "BUILD_HASH=${BUILD_HASH}" >> $GITHUB_ENV

- name: "Serve standalone UI"
if: ${{ env.BACKEND_FLAVOR == 'standalone' }}
run: |
mkdir -p www/static/
mv ansible-hub-ui/dist www/static/galaxy_ng
Expand All @@ -178,20 +148,6 @@ jobs:
--rewrite '/v2/(.*) -> http://localhost:5001/v2/$1' \
--rewrite '/extensions/v2/(.*) -> http://localhost:5001/extensions/v2/$1' &

- name: "Serve community UI"
if: ${{ env.BACKEND_FLAVOR == 'community' }}
run: |
mkdir -p www/
mv ansible-hub-ui/dist/* www/
cd www
echo '{}' > package.json
npm install local-web-server
node_modules/.bin/ws --port 8002 --directory . --spa index.html \
--rewrite '/api/(.*) -> http://localhost:5001/api/$1' \
--rewrite '/pulp/api/(.*) -> http://localhost:5001/pulp/api/$1' \
--rewrite '/v2/(.*) -> http://localhost:5001/v2/$1' \
--rewrite '/extensions/v2/(.*) -> http://localhost:5001/extensions/v2/$1' &

- name: "Install Cypress & test dependencies"
working-directory: 'ansible-hub-ui/test'
run: |
Expand All @@ -205,33 +161,26 @@ jobs:
- name: "Configure Cypress"
working-directory: 'ansible-hub-ui/test'
run: |
cp -aiv ../.github/workflows/cypress/cypress.env.json."$BACKEND_FLAVOR" cypress.env.json
cp -aiv ../.github/workflows/cypress/cypress.env.json cypress.env.json

- name: "Ensure standalone index.html uses the new js"
if: ${{ env.BACKEND_FLAVOR == 'standalone' }}
- name: "Ensure index.html uses the new js"
run: |
echo 'expecting /static/galaxy_ng/js/App.'"$BUILD_HASH"'.js'
curl http://localhost:8002/static/galaxy_ng/index.html | tee /dev/stderr | grep '/static/galaxy_ng/js/App.'"$BUILD_HASH"'.js'

- name: "Ensure community index.html uses the new js"
if: ${{ env.BACKEND_FLAVOR == 'community' }}
run: |
echo 'expecting /js/App.'"$BUILD_HASH"'.js'
curl http://localhost:8002/index.html | tee /dev/stderr | grep '/js/App.'"$BUILD_HASH"'.js'

- name: "Ensure galaxykit can connect to API"
run: |
galaxykit -s http://localhost:8002/"$API"/ -u admin -p admin collection list
galaxykit -s http://localhost:8002/api/galaxy/ -u admin -p admin collection list

- name: "Check initial feature flags"
run: |
curl -s http://localhost:5001/"$API"/_ui/v1/feature-flags/ | jq
curl -s http://localhost:5001/api/galaxy/_ui/v1/feature-flags/ | jq

- name: "Check component versions & settings"
run: |
HUB_TOKEN=`curl -s -u admin:admin -d '' http://localhost:5001/"$API"/v3/auth/token/ | jq -r .token`
curl -s -H "Authorization: Token $HUB_TOKEN" http://localhost:5001/"$API"/ | jq
curl -s -H "Authorization: Token $HUB_TOKEN" http://localhost:5001/"$API"/_ui/v1/settings/ | jq
HUB_TOKEN=`curl -s -u admin:admin -d '' http://localhost:5001/api/galaxy/v3/auth/token/ | jq -r .token`
curl -s -H "Authorization: Token $HUB_TOKEN" http://localhost:5001/api/galaxy/ | jq
curl -s -H "Authorization: Token $HUB_TOKEN" http://localhost:5001/api/galaxy/_ui/v1/settings/ | jq

- name: "Check if e2e contains only dirs in matrix test array"
working-directory: 'ansible-hub-ui'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
API_PORT=5001
COMPOSE_BINARY=docker
COMPOSE_PROFILE=galaxy_ng/base
DEV_SOURCE_PATH=galaxy_ng
DJANGO_SUPERUSER_PASSWORD=admin
DJANGO_SUPERUSER_USERNAME=admin
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/cypress/compose.env.community

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/cypress/compose.env.standalone

This file was deleted.

7 changes: 0 additions & 7 deletions .github/workflows/cypress/cypress.env.json.community

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/dev-release.yml

This file was deleted.

Loading
Loading