Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Oct 14, 2024
1 parent 4923ffd commit 8ad4b53
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -ex

mkdir -p ailib/version
git rev-parse --short HEAD > ailib/version/git
docker build -t quay.io/karmab/aicli -f Dockerfile .
podman build -t quay.io/karmab/aicli -f Dockerfile .
5 changes: 3 additions & 2 deletions .github/copr.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
. venv/bin/activate
[ -d $HOME/.config ] || mkdir $HOME/.config
echo $COPR_BASE64 | base64 -d > $HOME/.config/copr
mkdir /tmp/results
docker run -v $PWD:/workdir -v /tmp/results:/tmp/results quay.io/karmab/rpkg --path /workdir srpm --outdir /tmp/results --spec /workdir/assisted-service-client.spec
podman run -v $PWD:/workdir -v /tmp/results:/tmp/results quay.io/karmab/rpkg --path /workdir srpm --outdir /tmp/results --spec /workdir/assisted-service-client.spec
copr-cli build --nowait aicli /tmp/results/assisted-service-client*.rpm
docker run -v $PWD:/workdir -v /tmp/results:/tmp/results quay.io/karmab/rpkg --path /workdir srpm --outdir /tmp/results --spec /workdir/aicli.spec
podman run -v $PWD:/workdir -v /tmp/results:/tmp/results quay.io/karmab/rpkg --path /workdir srpm --outdir /tmp/results --spec /workdir/aicli.spec
copr-cli build --nowait aicli /tmp/results/aicli*src.rpm
8 changes: 3 additions & 5 deletions .github/linting.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash

set -ex
. venv/bin/activate

pip3 install pep8 wheel

# find . -type f -iname "*.py" -exec pep8 --ignore=E402,W504,E721 --max-line-length=120 {} +
# find . -name '*.py' | misspellings -f -
find aicli -type f -iname "*.py" -exec pycodestyle --ignore=E402,W504,E721,E722,E741 --max-line-length=120 {} +
find aicli -name '*.py' | codespell -f -
7 changes: 6 additions & 1 deletion .github/prep.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
pip3 install copr-cli
apt-get update
apt-get -y install podman pycodestyle codespell

python3 -m venv venv
. venv/bin/activate
pip3 install copr-cli pep8 wheel setuptools twine
7 changes: 3 additions & 4 deletions .github/release.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

set -ex
. venv/bin/activate

docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
docker push quay.io/karmab/aicli:latest
podman login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
podman push quay.io/karmab/aicli:latest

pip3 install setuptools
export VERSION=$(date "+%Y%m%d%H%M")
sed -i "s/99.0/99.0.$VERSION/" setup.py
python3 setup.py bdist_wheel
pip3 install twine
twine upload --repository-url https://upload.pypi.org/legacy/ -u $PYPI_USERNAME -p $PYPI_PASSWORD --skip-existing dist/*
6 changes: 3 additions & 3 deletions .github/release_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -ex
TAG="$(date +%y.%m)"
mkdir -p ailib/version
git rev-parse --short HEAD > ailib/version/git
docker build -t quay.io/karmab/aicli:$TAG -f Dockerfile .
docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
docker push quay.io/karmab/aicli:$TAG
podman build -t quay.io/karmab/aicli:$TAG -f Dockerfile .
podman login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
podman push quay.io/karmab/aicli:$TAG

# export VERSION=$(date "+%Y%m%d%H%M")
# sed -i "s/99.0/99.0.$VERSION/" setup.py
Expand Down

0 comments on commit 8ad4b53

Please sign in to comment.