forked from ebx/ebx-jobqueue-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec-release-dev.yml
58 lines (53 loc) · 2.01 KB
/
buildspec-release-dev.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
49
50
51
52
53
54
55
56
57
58
version: 0.2
env:
variables:
DEV_BRANCH: dev
RELEASE_BRANCH: master
REPO: ebx/ebx-jobqueue-sdk
BASE_BUILD_EMAIL_RECIPIENT: [email protected]
BUILD_SCRIPTS_DIR: Infrastructure/Build-Scripts
BUILD_DOCKER_DIR: Infrastructure/Build-Docker
BUILD_HELM_DIR: Infrastructure/Build-Helm
INFRASTRUCTURE_CDK_DIR: Infrastructure/Build-Infrastructure
parameter-store:
README_TOKEN: '/Prod/External/Readme.io/APIToken'
secrets-manager:
GITHUB_TOKEN: '/Prod/External/Github/APIToken-SupportAtEchoboxCom'
ARCHIVA_REPO_CREDS: '/Prod/External/Archiva/RepoCredentials'
phases:
install:
runtime-versions:
java: corretto8
commands:
- ## install python3 to allow build_docs.py to run
- apt-get update
- apt install -y python3-pip
- pip install --upgrade pip
- pip --version
- apt install -y dos2unix
pre_build:
commands:
- ## Confirm build versions
- docker --version
- java -version
- ## BOOTSTRAP Script - must run first !
- chmod a+x ${BUILD_SCRIPTS_DIR}/get_latest_buildscripts.sh
- ${BUILD_SCRIPTS_DIR}/get_latest_buildscripts.sh
- chmod a+x ${BUILD_SCRIPTS_DIR}/archiva_version_check_and_deploy.sh
- chmod a+x ${BUILD_SCRIPTS_DIR}/send_email_notification.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
- # In dev pipeline will build and determine if version exists but will not deploy
- ${BUILD_SCRIPTS_DIR}/archiva_version_check_and_deploy.sh "TRUE"
post_build:
commands:
- ## will send email if codebuild was triggered from pipeline and codebuild was successful
- ${BUILD_SCRIPTS_DIR}/send_email_notification.sh
cache:
paths:
- '/root/.m2/**/*'