Skip to content

Commit 42600e5

Browse files
authored
chore: Add build_deploy file (#211)
* Add build_deploy file * Add build-deploy file
1 parent 635a019 commit 42600e5

3 files changed

Lines changed: 44 additions & 17783 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM registry.centos.org/centos/centos:7
22

3-
MAINTAINER Jyasveer Gotta <jgotta@redhat.com>
3+
LABEL Jyasveer Gotta <jgotta@redhat.com>
44

55
RUN mkdir -p /opt/scripts /var/www/html
66

build_deploy.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -exv
3+
4+
BASE_IMG="fabric8-analytics-stack-report-ui"
5+
QUAY_IMAGE="quay.io/app-sre/${BASE_IMG}"
6+
IMG="${BASE_IMG}:latest"
7+
8+
GIT_HASH=`git rev-parse --short=7 HEAD`
9+
10+
# build the image
11+
docker build --no-cache \
12+
--force-rm \
13+
-t ${IMG} \
14+
-f ./Dockerfile .
15+
16+
# push the image
17+
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
18+
"docker-daemon:${IMG}" \
19+
"docker://${QUAY_IMAGE}:latest"
20+
21+
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
22+
"docker-daemon:${IMG}" \
23+
"docker://${QUAY_IMAGE}:${GIT_HASH}"

0 commit comments

Comments
 (0)