Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: set up semaphore #18

Merged
merged 7 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .semaphore/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: v1.0
name: Release
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Release
task:
jobs:
- name: Execute chart-releaser
commands:
- checkout
- make cr.install
- make helm.package
- make helm.upload
- make helm.index
18 changes: 18 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: v1.0
name: Pipeline
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Lint
task:
jobs:
- name: Lint
commands:
- checkout
- make helm.lint
promotions:
- name: Release
pipeline_file: release.yml
deployment_target: release
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
PKG_LOCAL_DIR=.pkg
GIT_REPO_OWNER=renderedtext
GIT_REPO=helm-charts

helm.package:
helm package charts/* -d $(PKG_LOCAL_DIR)

helm.lint:
helm lint charts/*

helm.upload:
cr upload \
--owner $(GIT_REPO_OWNER) \
--git-repo $(GIT_REPO) \
--package-path $(PKG_LOCAL_DIR) \
--token $$GITHUB_TOKEN \
--packages-with-index \
--skip-existing \
--push

helm.index:
cr index \
--owner $(GIT_REPO_OWNER) \
--git-repo $(GIT_REPO) \
--package-path $(PKG_LOCAL_DIR) \
--token $$GITHUB_TOKEN \
--packages-with-index \
--index-path . \
--push

cr.install:
curl -L -o /tmp/cr.tgz https://github.com/helm/chart-releaser/releases/download/v1.6.0/chart-releaser_1.6.0_linux_amd64.tar.gz
tar -xv -C /tmp -f /tmp/cr.tgz
sudo mv /tmp/cr /usr/local/bin/cr