-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ECOPROJECT-2524: Add AppSRE Continues Integration scripts
There are two scipts that need to be added here: * build-deploy.sh - build and push the image to app-sre quay.io registry * pr-check.sh - Just build the image for validation Signed-off-by: Nir Argaman <nargaman@redhat.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ yarn-error.log* | |
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.idea | ||
|
||
# CI temp directory | ||
docker-config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
PARENT_DIR="$(dirname "$SCRIPT_DIR")" | ||
cd "$PARENT_DIR" | ||
|
||
IMAGE_NAME="quay.io/app-sre/migration-planner-ui" | ||
GIT_HASH=$(git rev-parse --short=7 HEAD) | ||
|
||
podman build . -f Containerfile -t ${IMAGE_NAME}:latest | ||
podman tag ${IMAGE_NAME}:latest ${IMAGE_NAME}:${GIT_HASH} | ||
|
||
DOCKER_CONF="${PWD}/docker-config" | ||
DOCKER_AUTH_FILE="${DOCKER_CONF}/auth.json" | ||
mkdir -p "${DOCKER_CONF}" | ||
|
||
podman login -u="${QUAY_USER}" -p="${QUAY_TOKEN}" quay.io --authfile "${DOCKER_AUTH_FILE}" | ||
|
||
podman push "${IMAGE_NAME}:latest" --authfile "${DOCKER_AUTH_FILE}" | ||
podman push "${IMAGE_NAME}:${GIT_HASH}" --authfile "${DOCKER_AUTH_FILE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
PARENT_DIR="$(dirname "$SCRIPT_DIR")" | ||
cd "$PARENT_DIR" | ||
|
||
IMAGE_NAME="quay.io/app-sre/migration-planner-ui" | ||
|
||
podman build . -f Containerfile -t ${IMAGE_NAME}:pr-check |