Skip to content

Commit a529e9c

Browse files
authored
Publish Binary Release Artifact for Atmos (#14)
* Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release * Add GitHub Action to build CLI and attach binary to GitHub release
1 parent 1cbd3e3 commit a529e9c

File tree

2 files changed

+103
-0
lines changed

2 files changed

+103
-0
lines changed

.github/workflows/build.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 'Build CLI and attach to GitHub release'
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
build:
9+
name: 'Build CLI and attach to GitHub release'
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout the repo
14+
- name: 'Checkout'
15+
uses: actions/checkout@v2
16+
17+
# Setup Go
18+
- name: 'Setup Go'
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: '1.15'
22+
- run: go version
23+
24+
# Build CLI binaries
25+
- name: 'Build CLI'
26+
run: |
27+
set -e -x
28+
export VARIANT_VERSION=0.37.0
29+
export CGO_ENABLED=1
30+
sudo apt-get update && sudo apt-get install -y -u wget
31+
wget -q https://github.com/mumoshu/variant2/releases/download/v${VARIANT_VERSION}/variant_${VARIANT_VERSION}_linux_amd64.tar.gz && \
32+
tar -zvxf variant*.tar.gz variant
33+
./variant export binary $PWD ${{ github.workspace }}/atmos
34+
${{ github.workspace }}/atmos help
35+
36+
# Attach CLI binary to GitHub release
37+
- name: 'Attach CLI binary to GitHub release'
38+
uses: cloudposse/actions/github/[email protected]
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
INPUT_PATH: ${{ github.workspace }}/atmos

main.variant

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env variant
2+
# vim: filetype=hcl
3+
4+
option "dry-run" {
5+
default = false
6+
description = "Disable execution of any commands and echo the command instead"
7+
type = bool
8+
}
9+
10+
option "kubeconfig-path" {
11+
default = "/dev/shm"
12+
description = "folder to save kubeconfig"
13+
type = string
14+
}
15+
16+
option "helm-aws-profile-pattern" {
17+
default = "{namespace}-{environment}-{stage}-helm"
18+
description = "AWS profile pattern for helm and helmfile"
19+
type = string
20+
}
21+
22+
option "cluster-name-pattern" {
23+
default = "{namespace}-{environment}-{stage}-eks-cluster"
24+
description = "Cluster name pattern"
25+
type = string
26+
}
27+
28+
option "terraform-dir" {
29+
default = "./components/terraform"
30+
description = "Terraform components directory"
31+
type = string
32+
}
33+
34+
option "helmfile-dir" {
35+
default = "./components/helmfile"
36+
description = "Helmfile components directory"
37+
type = string
38+
}
39+
40+
option "config-dir" {
41+
default = "./stacks"
42+
description = "Stacks config directory"
43+
type = string
44+
}
45+
46+
option "vendor-config-path" {
47+
default = "./vendir.yml"
48+
description = "Path to the vendor configuration file"
49+
type = string
50+
}
51+
52+
imports = [
53+
"./modules/utils",
54+
"./modules/shell",
55+
"./modules/kubeconfig",
56+
"./modules/terraform",
57+
"./modules/helmfile",
58+
"./modules/helm",
59+
"./modules/workflow",
60+
"./modules/istio",
61+
"./modules/vendor"
62+
]

0 commit comments

Comments
 (0)