forked from ebx/ebx-jobqueue-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec-release-master.yml
48 lines (43 loc) · 1.72 KB
/
buildspec-release-master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: 0.2
env:
variables:
DEV_BRANCH: dev
RELEASE_BRANCH: master
REPO: ebx/ebx-jobqueue-sdk
BASE_BUILD_EMAIL_RECIPIENT: backend-deployments-group@echobox.com
HELM_NAMESPACE: production
BUILD_SCRIPTS_DIR: Infrastructure/Build-Scripts
BUILD_DOCKER_DIR: Infrastructure/Build-Docker
BUILD_HELM_DIR: Infrastructure/Build-Helm
INFRASTRUCTURE_CDK_DIR: Infrastructure/Build-Infrastructure
secrets-manager:
GITHUB_TOKEN: '/Prod/External/Github/APIToken-SupportAtEchoboxCom'
ARCHIVA_REPO_CREDS: '/Prod/External/Archiva/RepoCredentials'
phases:
install:
runtime-versions:
java: corretto8
commands:
- apt-get update
- apt install -y dos2unix
pre_build:
commands:
- ## BOOTSTRAP Script - must run first !!
- chmod a+x ${BUILD_SCRIPTS_DIR}/get_latest_buildscripts.sh
- ${BUILD_SCRIPTS_DIR}/get_latest_buildscripts.sh
- ## Set some further permissions
- chmod a+x ${BUILD_SCRIPTS_DIR}/send_email_notification.sh
- chmod a+x ${BUILD_SCRIPTS_DIR}/get_current_git_branch.sh
- chmod a+x ${BUILD_SCRIPTS_DIR}/archiva_version_check_and_deploy.sh
build:
commands:
- ## get the current branch based upon the pipeline settings
- CURRENT_BRANCH=$(sh ${BUILD_SCRIPTS_DIR}/get_current_git_branch.sh)
- # output test message
- echo "Running pipeline for REPO - ${REPO}, BRANCH - ${CURRENT_BRANCH}"
- # parameter indicates if in test mode. If not then will deploy to archiva
- ${BUILD_SCRIPTS_DIR}/archiva_version_check_and_deploy.sh "FALSE"
post_build:
commands:
- ## will send email if codebuild was triggered from pipeline and codebuild was successful
- ${BUILD_SCRIPTS_DIR}/send_email_notification.sh