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

12158 test latest published versions shell #5

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
289d11b
first iteration
aalves08 Dec 3, 2024
8efc9ed
comment out other workflows + set correct trigger for testing
aalves08 Dec 3, 2024
6ad8c52
trigger update
aalves08 Dec 3, 2024
509b279
update
aalves08 Dec 3, 2024
28e2f28
update
aalves08 Dec 3, 2024
39e1ea9
update
aalves08 Dec 3, 2024
201cd4a
update
aalves08 Dec 3, 2024
71b154f
update
aalves08 Dec 3, 2024
ed076c3
update
aalves08 Dec 3, 2024
2f0281b
update
aalves08 Dec 3, 2024
11beb3a
update
aalves08 Dec 3, 2024
6b815b1
add more tests + reformat slack message
aalves08 Dec 4, 2024
0eaed56
update
aalves08 Dec 4, 2024
c4a96cb
update
aalves08 Dec 4, 2024
69b44b5
update
aalves08 Dec 4, 2024
94091f3
update
aalves08 Dec 4, 2024
19a3e37
update
aalves08 Dec 4, 2024
8a8289a
update
aalves08 Dec 4, 2024
b5d432a
update
aalves08 Dec 4, 2024
db5cd91
update
aalves08 Dec 4, 2024
011e558
update
aalves08 Dec 4, 2024
ec73212
update
aalves08 Dec 4, 2024
43a524f
update
aalves08 Dec 4, 2024
ccbb87e
update
aalves08 Dec 4, 2024
e08f032
update
aalves08 Dec 4, 2024
22fcd37
update
aalves08 Dec 4, 2024
b11724b
update
aalves08 Dec 4, 2024
24d1b3e
update
aalves08 Dec 4, 2024
fe7bfb0
update
aalves08 Dec 4, 2024
8a89219
update
aalves08 Dec 4, 2024
d128722
update
aalves08 Dec 4, 2024
658ad07
update
aalves08 Dec 4, 2024
3c84005
update
aalves08 Dec 4, 2024
656d88a
update
aalves08 Dec 4, 2024
e4988d3
update
aalves08 Dec 4, 2024
adc4494
update
aalves08 Dec 5, 2024
20ab51a
update
aalves08 Dec 5, 2024
2bacac8
convert back to bash
aalves08 Dec 5, 2024
ddae8ea
test after changing upgrade to bash
aalves08 Dec 5, 2024
ed22966
debug package.jsons
aalves08 Dec 5, 2024
f52dfa5
debug package.jsons
aalves08 Dec 5, 2024
20728ca
run all script tests
aalves08 Dec 5, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/check-plugins.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: check-plugins-build
on:
pull_request:
branches:
- master
# pull_request:
# branches:
# - master
env:
TEST_PERSIST_BUILD: true
jobs:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docusaurus.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Publish Docusaurus

on:
push:
branches:
- master
pull_request:
branches:
- master
# push:
# branches:
# - master
# pull_request:
# branches:
# - master
jobs:
build:
name: Build
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/scripts/test-extensions-creators-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
#!/usr/bin/env bash

set -eo pipefail

SKELETON_APP_NAME="test-pkg"


validate_tagged_extension_creator() {
TAG=$1
NODE_VERSION=$2
UPDATE=$3

if [ -n "$UPDATE" ]; then
echo "*** Will also cover the UPDATE path and MIGRATION on this run! ***"
UPDATE="true"
fi

# these two commands will allow for NVM to work in bash, since it's included in ubuntu-latest
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh

DIR=$(mktemp -d)
cd $DIR

echo "*** ***************************************** ***"
echo "*** Verifying extension creator for tag ::: ${TAG} ***"
echo "*** ***************************************** ***"
echo "Using temporary directory ${DIR}"

echo "=> Setting up node version required for this env: ${NODE_VERSION}"
echo "=> Current dir 1:"
pwd

# setting up correct version of node
nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}

# generate skeleton app
npm init @rancher/extension@${TAG} ${SKELETON_APP_NAME} --app-name test-app | cat
cd ${SKELETON_APP_NAME}

# install dependencies
yarn install

# test build of pkg inside skeleton app
yarn build-pkg ${SKELETON_APP_NAME} | cat

echo "=> Current dir 2:"
pwd

if [ $UPDATE == "true" ]; then
echo "*** ***************************************** ***"
echo "*** Testing FULL UPGRADE path for extensions ***"
echo "*** ***************************************** ***"
echo "=> Testing UPGRADE from legacy-v1 to legacy-v2"

echo "=> Current dir 3:"
pwd

git init
#when doing git init, we are sent to .git folder
cd ..
cd ${SKELETON_APP_NAME}

echo "=> Current dir 4:"
pwd

npm init @rancher/extension@legacy-v2 -- --update

rm -rf node_modules
rm -rf yarn.lock

yarn install

cat package.json

yarn build-pkg ${SKELETON_APP_NAME} | cat

echo "*** ***************************************** ***"
echo "*** Testing UPGRADE from legacy-v2 to latest ***"
echo "*** ***************************************** ***"

echo "=> Updating node version required for last leg of upgrade path: v20"

nvm install v20
nvm use v20

npm init @rancher/extension -- --migrate

# debug changes done via migration script
cat package.json

rm -rf node_modules
rm -rf yarn.lock

yarn install

yarn build-pkg ${SKELETON_APP_NAME} | cat
fi

echo "Cleaning temporary dir"
cd ${DIR}

echo "Removing folder ${DIR}"
rm -rf ${DIR}
}

# test creating an extension with latest shell releases + build
validate_tagged_extension_creator "legacy-v1" "v16"
validate_tagged_extension_creator "legacy-v2" "v16"
validate_tagged_extension_creator "latest" "v20"

# test update paths + build
validate_tagged_extension_creator "legacy-v1" "v16" "true"
12 changes: 6 additions & 6 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: storybook
env:
STORYBOOK_TOKEN: ${{ secrets.STORYBOOK_TOKEN }}
on:
push:
branches:
- master
pull_request:
branches:
- master
# push:
# branches:
# - master
# pull_request:
# branches:
# - master
jobs:
storybook:
runs-on: ubuntu-latest
Expand Down
Loading
Loading