-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from converged-computing/first-release
prepare for first release
- Loading branch information
Showing
10 changed files
with
206 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: metrics operator tag and release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
description: Custom release tag | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build-arm: | ||
runs-on: ubuntu-latest | ||
name: make and build arm | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Set tag | ||
run: | | ||
echo "Tag for release is ${{ inputs.release_tag }}" | ||
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.20 | ||
- name: GHCR Login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Add custom buildx ARM builder | ||
run: | | ||
docker buildx create --name armbuilder | ||
docker buildx use armbuilder | ||
docker buildx inspect --bootstrap | ||
- name: Deploy Container | ||
env: | ||
tag: ${{ env.tag }} | ||
run: make arm-deploy ARMIMG=ghcr.io/converged-computing/metrics-operator:${tag}-arm | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
command: [docker] | ||
name: make and build ${{ matrix.command }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.20 | ||
- name: Set tag | ||
run: | | ||
echo "Tag for release is ${{ inputs.release_tag }}" | ||
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV} | ||
- name: GHCR Login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Container | ||
env: | ||
tag: ${{ env.tag }} | ||
run: | | ||
image=ghcr.io/converged-computing/metrics-operator-${{ matrix.command }}:v${tag} | ||
img=ghcr.io/converged-computing/metrics-operator:v${tag} | ||
make ${{ matrix.command }}-build BUNDLE_IMG=${image} IMG=${img} CATALOG_IMG=${image} | ||
- name: Deploy Container | ||
env: | ||
tag: ${{ env.tag }} | ||
run: | | ||
image=ghcr.io/converged-computing/metrics-operator-${{ matrix.command }}:v${tag} | ||
img=ghcr.io/converged-computing/metrics-operator:v${tag} | ||
make ${{ matrix.command }}-push BUNDLE_IMG=${image} IMG=${img} CATALOG_IMG=${image} | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.20 | ||
- name: Set tag | ||
run: | | ||
echo "Tag for release is ${{ inputs.release_tag }}" | ||
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV} | ||
- name: Install | ||
run: conda create --quiet --name mo twine | ||
- name: Install dependencies | ||
run: | | ||
export PATH="/usr/share/miniconda/bin:$PATH" | ||
source activate mo | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USER }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }} | ||
tag: ${{ env.tag }} | ||
run: | | ||
export PATH="/usr/share/miniconda/bin:$PATH" | ||
source activate mo | ||
cd sdk/python/v1alpha1/ | ||
pip install -e . | ||
python setup.py sdist bdist_wheel | ||
cd dist | ||
wheelfile=$(ls metricsoperator-*.whl) | ||
wheelfile=$(echo "$wheelfile" | sed "s/metricsoperator-//") | ||
wheelfile=$(echo "$wheelfile" | sed "s/-py3-none-any.whl//") | ||
echo "Release for Python is ${wheelfile}" | ||
echo "Release for metrics operator is ${tag}" | ||
cd ../ | ||
if [[ "${wheelfile}" == "${tag}" ]]; then | ||
echo "Versions are correct, publishing." | ||
twine upload dist/* | ||
else | ||
echo "Versions are not correct, please fix and upload locally." | ||
fi | ||
- name: Build release manifests | ||
env: | ||
tag: ${{ env.tag }} | ||
run: | | ||
make build-config-arm ARMIMG=ghcr.io/converged-computing/metrics-operator:${tag}-arm | ||
make build-config IMG=ghcr.io/converged-computing/metrics-operator:v${tag} | ||
- name: Release metrics Operator | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: Metrics Operator Release v${{ env.tag }} | ||
tag_name: ${{ env.tag }} | ||
generate_release_notes: true | ||
files: | | ||
examples/dist/metrics-operator-arm.yaml | ||
examples/dist/metrics-operator.yaml | ||
env: | ||
GITHUB_REPOSITORY: converged-computing/metrics-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ metricsoperator.egg-info | |
build | ||
__pycache__ | ||
.eggs | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# CHANGELOG | ||
|
||
This is a manually generated log to track changes to the repository for each release. | ||
Each section should include general headers such as **Implemented enhancements** | ||
and **Merged pull requests**. Critical items to know are: | ||
|
||
- renamed commands | ||
- deprecated / removed commands | ||
- changed defaults | ||
- backward incompatible changes (recipe file format? image file format?) | ||
- migration guidance (how to convert images?) | ||
- changed behaviour (recipe sections work differently) | ||
|
||
The versions coincide with releases on pip. Only major versions will be released as tags on Github. | ||
|
||
## [0.0.x](https://github.com/converged-computing/metrics-operator/tree/main) (0.0.x) | ||
- First release with support for parsing io-sysstat output (0.0.1) | ||
- Skeleton release (0.0.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
# Metrics Operator Python | ||
|
||
> Helpers for submitting CRD with Python and parsing logs. | ||
![https://raw.githubusercontent.com/converged-computing/metrics-operator/main/docs/images/metrics-operator-banner.png](https://raw.githubusercontent.com/converged-computing/metrics-operator/main/docs/images/metrics-operator-banner.png) | ||
|
||
Welcome to the Metrics Operator Python! You can learn more about the operator | ||
at the ⭐️ [Documentation](https://converged-computing.github.io/metrics-operator/) ⭐️ | ||
and see our [python examples](https://github.com/converged-computing/metrics-operator/tree/main/examples/python/) for examples of using this module. | ||
|
||
## License | ||
|
||
HPCIC DevTools is distributed under the terms of the MIT license. | ||
All new contributions must be made under this license. | ||
|
||
See [LICENSE](https://github.com/converged-computing/cloud-select/blob/main/LICENSE), | ||
[COPYRIGHT](https://github.com/converged-computing/cloud-select/blob/main/COPYRIGHT), and | ||
[NOTICE](https://github.com/converged-computing/cloud-select/blob/main/NOTICE) for details. | ||
|
||
SPDX-License-Identifier: (MIT) | ||
|
||
LLNL-CODE- 842614 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
if __name__ == "__main__": | ||
setup( | ||
name="metricsoperator", | ||
version="0.0.0", | ||
version="0.0.1", | ||
author="Vanessasaurus", | ||
author_email="[email protected]", | ||
maintainer="Vanessasaurus", | ||
|