Skip to content

Commit 808cc36

Browse files
author
Mikhail Khomenko
committed
build & deploy image to gcr
1 parent b298018 commit 808cc36

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/build-push-gcr.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build & Publish Image to GCR
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
PROJECT_ID: hackathon-297608
10+
GCR_LOCATION: eu.gcr.io
11+
IMAGE_NAME: ${{ github.repository }}
12+
GITHUB_SHA: ${{ github.sha }}
13+
14+
jobs:
15+
gcloud-install-build-push-GCR:
16+
name: Add gcloud, Build & Publish
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Setup gcloud cli
23+
uses: google-github-actions/[email protected]
24+
with:
25+
version: '290.0.1'
26+
service_account_key: ${{ secrets.GCR_SERVICE_ACCOUNT_KEY }}
27+
28+
- name: Build & Publish
29+
run: |
30+
gcloud auth configure-docker
31+
export TAG=${GCR_LOCATION}/${PROJECT_ID}/$(echo ${IMAGE_NAME,,} | tr '/' '-'):${GITHUB_SHA}
32+
docker build --tag ${TAG} .
33+
docker push ${TAG}
34+

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ RUN mkdir -p /tmp/deps \
2121
USER ${ISC_PACKAGE_MGRUSER}
2222

2323
COPY Installer.cls .
24+
COPY post_start_hook .
2425
COPY src src
2526
COPY iris.script iris.script
2627

post_start_hook

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -e
2+
set -o pipefail
3+
4+
/bin/echo -e "" \
5+
" set sc = ##class(Security.Users).UnExpireUserPasswords(\"*\")" \
6+
" if '\$Get(sc) { do ##class(%SYSTEM.Process).Terminate(, 1) }" \
7+
" set sc = ##class(SYS.Container).ChangePassword(\"/etc/iris-secrets/iris-password\")" \
8+
" if '\$Get(sc) { do ##class(%SYSTEM.Process).Terminate(, 1) }" \
9+
" set sc = ##class(SYS.Container).ChangeGatewayMgrPassword(\"/etc/iris-secrets/iris-password\")" \
10+
" if '\$Get(sc) { do ##class(%SYSTEM.Process).Terminate(, 1) }" \
11+
" halt" \
12+
| iris session ${ISC_PACKAGE_INSTANCENAME} -U %SYS
13+
14+
iris stop ${ISC_PACKAGE_INSTANCENAME} restart quietly

0 commit comments

Comments
 (0)