Skip to content

Commit

Permalink
Added setuptools and PyQt5-Qt5 in requirements file(s) added if darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
gitofanindya committed May 13, 2024
2 parents 0873a31 + 89d3bb7 commit 79184a8
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 34 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/alpha_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@ jobs:
with:
fetch-depth: "0"

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}

- name: Clean-up old versions
run: bash tools/cleanup.sh ${{ github.event.inputs.appVersion }}
16 changes: 13 additions & 3 deletions .github/workflows/beta_to_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}

- name: Ready for promotion
run: bash tools/deploy.sh ${{ github.event.inputs.betaVersion }}
12 changes: 0 additions & 12 deletions .github/workflows/main.yml

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,21 @@ jobs:
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}
- name: Setup git
run: |
git config user.email ${{ env.GITHUB_EMAILID }}
Expand Down
6 changes: 3 additions & 3 deletions tools/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ purge() {

echo " - ${version}"
python3 tools/versions.py --delete "${version}"
ssh -o StrictHostKeyChecking=no -T nuxeo@lethe.nuxeo.com "rm -vf ${REMOTE_PATH_PROD}/alpha/*${version}.* ${REMOTE_PATH_PROD}/alpha/*${version}-*" || true
ssh -o StrictHostKeyChecking=no -T lethe.nuxeo.com "rm -vf ${REMOTE_PATH_PROD}/alpha/*${version}.* ${REMOTE_PATH_PROD}/alpha/*${version}-*" || true
git tag --delete "alpha-${version}" || true
git push --delete origin "wip-alpha-${version}" || true # branch
git push --delete origin "alpha-${version}" || true # tag
Expand All @@ -32,7 +32,7 @@ main() {
python3 -m pip install --user pyyaml==5.3.1

echo ">>> Retrieving versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
rsync -e "ssh -o StrictHostKeyChecking=no" -vz lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .

echo ">>> Checking versions.yml integrity"
python3 tools/versions.py --check || exit 1
Expand Down Expand Up @@ -68,7 +68,7 @@ main() {
python3 tools/versions.py --check || exit 1

echo ">>> Uploading versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
}

main "$@"
6 changes: 3 additions & 3 deletions tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ release() {
fi

echo ">>> [${latest_release}] Deploying to the production website"
ssh -o "StrictHostKeyChecking=no" -T nuxeo@lethe.nuxeo.com <<EOF
ssh -o "StrictHostKeyChecking=no" -T lethe.nuxeo.com <<EOF
# Move beta files into the release folder
mv -vf ${REMOTE_PATH_PROD}/beta/*${drive_version}* ${REMOTE_PATH_PROD}/release/
Expand All @@ -45,9 +45,9 @@ EOF
echo ">>> [release ${drive_version}] Generating the versions file"
python3 -m pip install --user -U setuptools wheel
python3 -m pip install --user pyyaml==5.3.1
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
rsync -e "ssh -o StrictHostKeyChecking=no" -vz lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
python3 tools/versions.py --promote "${drive_version}" --type "release"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
}

release "$@"
8 changes: 6 additions & 2 deletions tools/deps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,12 @@ pyqt5==5.15.10 \
--hash=sha256:b89478d16d4118664ff58ed609e0a804d002703c9420118de7e4e70fa1cb5486 \
--hash=sha256:d46b7804b1b10a4ff91753f8113e5b5580d2b4462f3226288e2d84497334898a \
--hash=sha256:ff99b4f91aa8eb60510d5889faad07116d3340041916e46c07d519f7cad344e1
PyQt5-Qt5==5.15.13 \
--hash=sha256:92575a9e96a27c4ed67c56c7048ded7461a1655d5d21f0e05064664e6e9fcbdf
PyQt5-Qt5==5.15.13 ; sys_platform == "darwin" \
--hash=sha256:141859f2ffe04cc6c5db970e2b6ad9f98897805d886a14c52614e3799daab6d6
PyQt5-Qt5==5.15.2 ; sys_platform == "win32" \
--hash=sha256:9cc7a768b1921f4b982ebc00a318ccb38578e44e45316c7a4a850e953e1dd327
PyQt5-Qt5==5.15.2 ; sys_platform == "linux" \
--hash=sha256:1988f364ec8caf87a6ee5d5a3a5210d57539988bf8e84714c7d60972692e2f4a
pyqt5-stubs==5.15.6.0 \
--hash=sha256:7fb8177c72489a8911f021b7bd7c33f12c87f6dba92dcef3fdcdb5d9400f0f3f \
--hash=sha256:91270ac23ebf38a1dc04cd97aa852cd08af82dc839100e5395af1447e3e99707
Expand Down
6 changes: 3 additions & 3 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cancel() {
artifacts="${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER}"

echo ">>> [Deploy] Removing uploaded artifacts"
ssh -o "StrictHostKeyChecking=no" nuxeo@lethe.nuxeo.com rm -rfv "${artifacts}"
ssh -o "StrictHostKeyChecking=no" lethe.nuxeo.com rm -rfv "${artifacts}"
}

create() {
Expand Down Expand Up @@ -48,8 +48,8 @@ publish() {
fi

echo ">>> [${release_type} ${drive_version}] Deploying to the server"
scp -o "StrictHostKeyChecking=no" tools/versions.py nuxeo@lethe.nuxeo.com:"${artifacts}"
ssh -o "StrictHostKeyChecking=no" -T nuxeo@lethe.nuxeo.com <<EOF
scp -o "StrictHostKeyChecking=no" tools/versions.py lethe.nuxeo.com:"${artifacts}"
ssh -o "StrictHostKeyChecking=no" -T lethe.nuxeo.com <<EOF
cd ${artifacts} || exit 1
echo " >> [Deploy] Generating ${drive_version}.yml"
Expand Down
4 changes: 2 additions & 2 deletions tools/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ publish_staging() {
path="${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER}/"

echo ">>> [Upload] Deploying to the staging server"
rsync -e "ssh -o StrictHostKeyChecking=no" --chmod=755 -pvz "${artifact}" nuxeo@lethe.nuxeo.com:"${path}" || \
rsync -e "ssh -o StrictHostKeyChecking=no" -vz "${artifact}" nuxeo@lethe.nuxeo.com:"${path}" || exit 1 # macOS does not have --chmod
rsync -e "ssh -o StrictHostKeyChecking=no" --chmod=755 -pvz "${artifact}" lethe.nuxeo.com:"${path}" || \
rsync -e "ssh -o StrictHostKeyChecking=no" -vz "${artifact}" lethe.nuxeo.com:"${path}" || exit 1 # macOS does not have --chmod
echo "Artifacts deployed to:"
echo " >>> ${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER} <<<"
}
Expand Down
3 changes: 3 additions & 0 deletions tools/windows/deploy_ci_agent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ function install_python {
if ($lastExitCode -ne 0) {
ExitWithCode $lastExitCode
}
Write-Output ">>> Drive Requires ('\$ {$Env:PYTHON_DRIVE_VERSION} '):"
$version_ = Get-Command python | fl * # Get-Command python | fl *
Write-Output ">>> Current Python version $version_"
}

function junit_arg($path, $run) {
Expand Down

0 comments on commit 79184a8

Please sign in to comment.