Skip to content

Commit

Permalink
[stable-4.10] Cut stable 4.10 (#5235)
Browse files Browse the repository at this point in the history
* rm *insights*

    fdfind insights
    git rm -rf config/insights.dev.webpack.config.js config/insights.prod.webpack.config.js src/containers/token/token-insights.tsx src/entry-insights.tsx src/loaders/insights/

* rm *community*

    fdfind community
    git rm -rf community/ config/community.dev.webpack.config.js config/community.prod.webpack.config.js test/cypress/e2e/community/

* rm irrelevant workflows

    git rm -rf .github/ISSUE_TEMPLATE .github/*.yml
    git rm .github/workflows/cypress/*.community
    git rm .github/workflows/{dev-release,i18n,labeler}.yml

* rm ephemeral deploy

    git rm *.sh
    git rm -rf deploy

* remove IS_COMMUNITY

* remove IS_INSIGHTS

* remove scores/ratings

* remove namespaceTitle

* Remove insights synclist

No-Issue

* clean up package.json

* remove namespaceBreadcrumb, lint

* remove landing page

* update README

* Update branches in workflows, clean up cypress worfklow & config

* drop more insights, UI_DEBUG

* remove lightspeed

* use 4.9 webpack base config

* bump version to 4.10.0b1

* remove changeOrigin from api routes

---------

Co-authored-by: Martin Hradil <[email protected]>
  • Loading branch information
jerabekjiri and himdel authored Sep 20, 2024
1 parent 75aa1d6 commit 0c59bfc
Show file tree
Hide file tree
Showing 98 changed files with 260 additions and 6,188 deletions.
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.

File renamed without changes.
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

0 comments on commit 0c59bfc

Please sign in to comment.