Skip to content

Commit d697265

Browse files
authored
Merge pull request #164 from kipr/refactor
Refactor libwallaby
2 parents 6cefbf2 + da644fd commit d697265

File tree

743 files changed

+15735
-38590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

743 files changed

+15735
-38590
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
10+
GKE_CLUSTER: kipr
11+
GKE_ZONE: us-central1-a
12+
IMAGE: kipr/simulator
13+
14+
concurrency: ${{ github.workflow }}
15+
16+
jobs:
17+
build-publish:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
outputs:
21+
image_version: ${{ steps.image_tag.outputs.IMAGE_TAG }}
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
with:
27+
submodules: true
28+
29+
# Calculate image tag name from commit hash
30+
- name: Set image tag output
31+
id: image_tag
32+
run: |-
33+
echo "::set-output name=IMAGE_TAG::${GITHUB_SHA::8}"
34+
# Setup gcloud CLI
35+
- name: Set up gcloud CLI
36+
uses: google-github-actions/setup-gcloud@v0.2.1
37+
with:
38+
service_account_key: ${{ secrets.GCR_SA_KEY }}
39+
project_id: ${{ secrets.GKE_PROJECT }}
40+
41+
# Ensure there isn't already a Docker image for this version
42+
- name: Ensure Docker image does not exist
43+
run: |-
44+
NUM_IMAGES=$(gcloud container images list-tags gcr.io/kipr-321905/kipr/simulator --filter="tags:${{ steps.image_tag.outputs.IMAGE_TAG }}" --format=json | jq '. | length')
45+
if (( NUM_IMAGES > 0 )); then exit 1; fi
46+
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
47+
- name: Configure Docker with gcloud
48+
run: |-
49+
gcloud --quiet auth configure-docker
50+
# Build the Docker image
51+
- name: Build Docker image
52+
run: |-
53+
docker build \
54+
--tag "gcr.io/$PROJECT_ID/$IMAGE:${{ steps.image_tag.outputs.IMAGE_TAG }}" \
55+
.
56+
# Push the Docker image to Google Container Registry
57+
- name: Publish Docker image to GCR
58+
run: |-
59+
docker push "gcr.io/$PROJECT_ID/$IMAGE:${{ steps.image_tag.outputs.IMAGE_TAG }}"
60+
61+
deploy-to-staging:
62+
name: Deploy to staging
63+
runs-on: ubuntu-latest
64+
needs: build-publish
65+
66+
steps:
67+
- name: Checkout deployment repo
68+
uses: actions/checkout@v2
69+
with:
70+
repository: 'kipr/kipr-yamls'
71+
ssh-key: ${{ secrets.KIPR_YAMLS_REPO_KEY }}
72+
73+
# Get the GKE credentials so we can deploy to the cluster
74+
- name: Get GKE credentials
75+
uses: google-github-actions/get-gke-credentials@v0.2.1
76+
with:
77+
cluster_name: ${{ env.GKE_CLUSTER }}
78+
location: ${{ env.GKE_ZONE }}
79+
credentials: ${{ secrets.GCR_SA_KEY }}
80+
81+
- name: Deploy to GKE
82+
run: |-
83+
helm upgrade \
84+
--install \
85+
--namespace prerelease \
86+
--values ./simulator/values.prerelease.yaml \
87+
--set imageVersion=${{ needs.build-publish.outputs.image_version }} \
88+
simulator-prerelease ./simulator

.github/workflows/bob.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
1-
# Compiled Object files
2-
*.slo
3-
*.lo
4-
*.o
5-
*.obj
6-
7-
# Precompiled Headers
8-
*.gch
9-
*.pch
10-
11-
# Compiled Dynamic libraries
12-
*.so
13-
*.dylib
14-
*.dll
15-
16-
# Fortran module files
17-
*.mod
18-
19-
# Compiled Static libraries
20-
*.lai
21-
*.la
22-
*.a
23-
*.lib
24-
25-
# Executables
26-
*.exe
27-
*.out
28-
*.app
29-
301
build
31-
.DS_Store
32-
obj-arm-linux-gnueabihf
33-
deploy
34-
lib
35-
doc
36-
37-
# VSCode folder
38-
.vscode
2+
.vscode/
3+
documentation/html
4+
documentation/man

0 commit comments

Comments
 (0)