TD-74::introduce ci

This commit is contained in:
ivnmrtk 2022-03-14 20:51:37 +03:00
parent 3b9149390e
commit 52b1622e00
2 changed files with 11 additions and 26 deletions

View File

@ -37,19 +37,4 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: Update and publish helm chart
run: |
cd ..
git config --global user.email "botkube-ci@infracloud.io"
git config --global user.name "BotKube CI"
git clone https://github.com/infracloudio/charts.git
cd charts
git fetch
git branch
git pull origin gh-pages
helm package --app-version v9.99.9-dev --version v9.99.9-dev ${{ github.workspace }}/helm/botkube/
helm repo index --url https://infracloudio.github.io/charts --merge index.yaml .
git add .
git commit -m "Update BotKube latest helm chart"
git push https://${{ secrets.GH_TOKEN }}@github.com/infracloudio/charts.git
version: v3.4.0

View File

@ -32,23 +32,23 @@ release_snapshot() {
export GORELEASER_CURRENT_TAG=latest
goreleaser release --rm-dist --snapshot --skip-publish
# Push images
docker push ghcr.io/infracloudio/botkube:latest-amd64
docker push ghcr.io/infracloudio/botkube:latest-arm64
docker push ghcr.io/infracloudio/botkube:latest-armv7
docker push ghcr.io/valitydev/botkube:latest-amd64
docker push ghcr.io/valitydev/botkube:latest-arm64
docker push ghcr.io/valitydev/botkube:latest-armv7
# Create manifest
docker manifest create ghcr.io/infracloudio/botkube:latest \
--amend ghcr.io/infracloudio/botkube:latest-amd64 \
--amend ghcr.io/infracloudio/botkube:latest-arm64 \
--amend ghcr.io/infracloudio/botkube:latest-armv7
docker manifest push ghcr.io/infracloudio/botkube:latest
docker manifest create ghcr.io/valitydev/botkube:latest \
--amend ghcr.io/valitydev/botkube:latest-amd64 \
--amend ghcr.io/valitydev/botkube:latest-arm64 \
--amend ghcr.io/valitydev/botkube:latest-armv7
docker manifest push ghcr.io/valitydev/botkube:latest
}
build() {
prepare
docker run --rm --privileged \
-v $PWD:/go/src/github.com/infracloudio/botkube \
-v $PWD:/go/src/github.com/valitydev/botkube \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/infracloudio/botkube \
-w /go/src/github.com/valitydev/botkube \
-e GORELEASER_CURRENT_TAG=latest \
goreleaser/goreleaser release --rm-dist --snapshot --skip-publish
}