Skip to content

Commit

Permalink
Use mobilecoind to finish ingest transition (#19)
Browse files Browse the repository at this point in the history
* update base image, use mobilecoind to finish ingest transition
* add actionlint profile and add cron to update images once a month for OS sec updates
* update docker actions
  • Loading branch information
jgreat authored Nov 3, 2022
1 parent 3f70b81 commit 93d7708
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- small
- large
6 changes: 3 additions & 3 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Generate Docker Tags
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REPO }}
tags: |
Expand All @@ -30,7 +30,7 @@ jobs:
type=sha,priority=10
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
Expand All @@ -39,7 +39,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Publish to DockerHub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
# Don't push on pull_request, just build and check for errors
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ name: tag
on:
push:
branches:
- main
- main
# Refresh images on the first of every month for OS security updates.
schedule:
- cron: '0 0 1 * *'

jobs:
tag:
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2022 MobileCoin Inc.
FROM alpine/helm:3.9.3
FROM alpine:edge

ENV HELM_CONFIG_HOME=/opt/helm
ENV HELM_REGISTRY_CONFIG=/opt/helm/registry.json
Expand All @@ -9,8 +9,9 @@ ENV HELM_CACHE_HOME=/opt/helm/cache
ENV HELM_DATA_HOME=/opt/helm/data
ENV HELM_PLUGINS=/opt/helm/plugins

RUN apk add --no-cache bash curl jq \
&& apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing kubectl \
RUN apk add --no-cache \
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
bash curl jq kubectl helm git \
&& mkdir -p /opt/helm/plugins \
&& helm plugin install https://github.com/chartmuseum/helm-push

Expand Down
4 changes: 3 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ inputs:
required: false
runs:
using: docker
# Switch image to Dockerfile and push to a branch for testing changes.
# Don't forget to switch back for the PR to release.
# image: Dockerfile
image: docker://mobilecoin/gha-k8s-toolbox:v1.0
image: docker://mobilecoin/gha-k8s-toolbox:v1
args:
- ${{ inputs.command }}
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ then
command="INITIALIZE_LEDGER='true' FOG_REPORT_URL='fog://fog.${INPUT_NAMESPACE}.development.mobilecoin.com:443' /util/generate_origin_data.sh"
toolbox_cmd "${toolbox}" "${command}"

echo " -- Use Fog test_client to generate blocks to finish retire of ${flipside}"
command="RUST_LOG=info /test/fog-test-client.sh --key-dir /tmp/sample_data/fog_keys --token-id 0"
echo " -- Use mobilecoind to generate blocks to finish retire of ${flipside}"
command="/test/mobilecoind-integration-test.sh"
toolbox_cmd "${toolbox}" "${command}"

# check active/retired status, if both nodes are not idle we error out.
Expand Down

0 comments on commit 93d7708

Please sign in to comment.