Skip to content

Commit

Permalink
Make different versions with action vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Nov 17, 2023
1 parent 2b78721 commit 4855672
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
43 changes: 31 additions & 12 deletions .github/workflows/build_installation_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,49 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download and compress dependencies
env:
DMWM_GIT_URL: ${{ vars.DMWM_GIT_URL }}
DMWM_GIT_TAG: ${{ vars.DMWM_GIT_TAG }}
DQMGUI_GIT_URL: ${{ vars.DQMGUI_GIT_URL }}
DQMGUI_GIT_TAG: ${{ vars.DQMGUI_GIT_TAG }}
ROOT_GIT_URL: ${{ vars.ROOT_GIT_URL }}
ROOT_GIT_TAG: ${{ vars.ROOT_GIT_TAG }}
run: |
sudo apt update && sudo apt install -y libcurl4-gnutls-dev
$(which python3) --version
bash download_dependencies.sh
bash download_dependencies.sh DMWM_GIT_TAG=$DMWM_GIT_TAG DMWM_GIT_URL=$DMWM_GIT_URL DQMGUI_GIT_TAG=$DQMGUI_GIT_TAG ROOT_GIT_URL=$ROOT_GIT_URL ROOT_GIT_TAG=$ROOT_GIT_TAG
bash build_installation_package.sh
echo "Automatically generated release for making the installation
package publicly available.
Used:
* DMWM_GIT_TAG=${DMWM_GIT_TAG}
* DMWM_GIT_URL=${DMWM_GIT_URL}
* DQMGUI_GIT_TAG=${DQMGUI_GIT_TAG}
* DQMGUI_GIT_URL=${DQMGUI_GIT_URL}
* ROOT_GIT_URL=${ROOT_GIT_URL}
* ROOT_GIT_TAG=${ROOT_GIT_TAG}
" >> /tmp/release_body.md
echo "RELEASE_TAG=deployment_${DMWM_GIT_TAG}_dqmgui_${DQMGUI_GIT_TAG}_root_${ROOT_GIT_TAG}" >> $GITHUB_ENV
- name: Archive package artifact
uses: actions/upload-artifact@v3
with:
name: dqmgui-installation-package
path: |
/tmp/dqmgui/dqmgui_installation_package.tar.gz
# Create a dummy release, so that the artifact is downloadable
# without a GitHub account
# This will automatically update the artifacts of the "latest" release,
# even though the "latest" tag does match with the actually latest commit.
# Create a release based on the tags used, so that the artifact is downloadable
# without a GitHub account.
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "/tmp/dqmgui/dqmgui_installation_package.tar.gz"
body:
"Automatically generated dummy release for making the installation
package publicly available. The `latest` tag is
put on a random commit, and does not reflect the current state of the release,
while the artifact of this release is updated with the actually latest files,
on each push."
tag: "latest"
bodyFile: "/tmp/release_body.md"
tag: ${{ env.RELEASE_TAG }}
allowUpdates: "true"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ This procedure has been tested on a RHEL8 Openstack VM. Instructions below are p
```
OR
* Download all the required files yourself (this is useful if you need specific versions of DMQM/deployment or DQMGUI, change them in `config.sh`):
> **Warning**
> You will need to have the same python version with the machine you rill be installing to! Configure that in `config.sh`, with the `PYTHON_VERSION` variable.
```bash
git clone --depth 1 https://github.com/cms-DQM/dqmgui_prod_deployment && cd dqmgui_prod_deployment
# Now change config.sh as needed.
Expand Down
2 changes: 1 addition & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Target python version. This is important for downloading
# compatible packages for PyPI. Make sure it's the same
# with the python version that is running on the target machine.
PYTHON_VERSION=3.11
PYTHON_VERSION=3.8

# Tag to use for getting the layouts and manage/deploy scripts
# See: https://github.com/dmwm/deployment/tags
Expand Down

0 comments on commit 4855672

Please sign in to comment.