mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
Merge pull request #1831 from nextcloud/feature/staged-rollouts
Feature/staged rollouts
This commit is contained in:
commit
abdedc0391
4
.github/workflows/build-docker.yml
vendored
4
.github/workflows/build-docker.yml
vendored
@ -154,7 +154,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Setup Selenium
|
||||
run: pip install selenium
|
||||
run: pip install selenium==4.10.0
|
||||
|
||||
- name: Wait for container startup
|
||||
run: |
|
||||
@ -421,7 +421,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Setup Selenium
|
||||
run: pip install selenium
|
||||
run: pip install selenium==4.10.0
|
||||
- name: Wait for container startup
|
||||
run: |
|
||||
set -e
|
||||
|
||||
12
.github/workflows/build-lxd.yml
vendored
12
.github/workflows/build-lxd.yml
vendored
@ -197,6 +197,10 @@ jobs:
|
||||
nictype: bridged
|
||||
type: nic
|
||||
EOF
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "${{ env.VERSION }}"
|
||||
- name: Setup Firefox
|
||||
uses: browser-actions/setup-firefox@latest
|
||||
- name: Setup GeckoDriver
|
||||
@ -204,11 +208,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Setup Selenium
|
||||
run: pip install selenium
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "${{ env.VERSION }}"
|
||||
run: pip install selenium==4.10.0
|
||||
- name: download LXD image from artifact store
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -331,7 +331,7 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Setup Selenium
|
||||
run: pip install selenium
|
||||
run: pip install selenium==4.10.0
|
||||
- name: download LXD image from artifact store
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
||||
@ -15,6 +15,18 @@ git clone -b "$BRANCH" --depth 20 -q --bare https://github.com/nextcloud/nextclo
|
||||
|
||||
cd "$TMPDIR" || exit 1
|
||||
VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" )
|
||||
|
||||
[[ -f "/usr/local/etc/instance.cfg" ]] && {
|
||||
cohorte_id="$(jq .cohorteId /usr/local/etc/instance.cfg)"
|
||||
[[ -f "./staged_rollouts/${VER}.txt" ]] && {
|
||||
grep "^${cohorte_id}$" "./staged_rollouts/${VER}.txt" || {
|
||||
echo "Skipping version $VER - cohorte ${cohorte_id} not yet active"
|
||||
cd / || exit 1
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format
|
||||
echo "$VER" > /var/run/.ncp-latest-version
|
||||
|
||||
|
||||
@ -72,4 +72,15 @@ if needs_decrypt; then
|
||||
apache2ctl -k graceful
|
||||
fi
|
||||
|
||||
[[ -f /usr/local/etc/instance.cfg ]] || {
|
||||
cohorte_id=$((1 + RANDOM % 100))
|
||||
cat > /usr/local/etc/instance.cfg <<EOF
|
||||
{
|
||||
"cohorteId": ${cohorte_id},
|
||||
"canary": false
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
16
generate_cohortes.sh
Executable file
16
generate_cohortes.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#min=$((101-${1:-50}))
|
||||
all=({100..1})
|
||||
cohortes=()
|
||||
for i in ${all[@]:0:$1}
|
||||
do
|
||||
cohorte_id=$((RANDOM % i))
|
||||
while [[ " ${cohortes[*]} " =~ .*" ${cohorte_id} ".* ]]
|
||||
do
|
||||
cohorte_id=$((cohorte_id+1))
|
||||
done
|
||||
cohortes+=($cohorte_id)
|
||||
done
|
||||
|
||||
echo "${cohortes[*]}" | tr ' ' $'\n'
|
||||
@ -84,6 +84,14 @@ rm /.ncp-image
|
||||
cd -
|
||||
rm -rf "${TMPDIR}"
|
||||
|
||||
cohorte_id=$((RANDOM % 100))
|
||||
cat <<EOF > /usr/local/etc/instance.cfg
|
||||
{
|
||||
"cohorteId": ${cohorte_id},
|
||||
"canary": false
|
||||
}
|
||||
EOF
|
||||
|
||||
IP="$(get_ip)"
|
||||
|
||||
echo "Done.
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
robotframework
|
||||
selenium
|
||||
robotframework
|
||||
11
updates/1.52.5.sh
Normal file
11
updates/1.52.5.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ -f /usr/local/etc/instance.cfg ]] || {
|
||||
cohorte_id=$((RANDOM % 100))
|
||||
cat > /usr/local/etc/instance.cfg <<EOF
|
||||
{
|
||||
"cohorteId": ${cohorte_id},
|
||||
"canary": false
|
||||
}
|
||||
EOF
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user