Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 - Fixing Branch Name #51

Merged
merged 3 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions web-client/Dockerfile.deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:8-alpine

# Versions: https://pypi.python.org/pypi/awscli#downloads
ENV AWS_CLI_VERSION 1.16.31

RUN apk --no-cache update && \
apk --no-cache add python py-pip py-setuptools ca-certificates groff less && \
apk --no-cache add bash git openssh && \
pip install --upgrade pip && \
pip --no-cache-dir install awscli==${AWS_CLI_VERSION} && \
rm -rf /var/cache/apk/*

RUN wget -q -O terraform_0.11.8_linux_amd64.zip https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip && \
unzip -o terraform_0.11.8_linux_amd64.zip terraform

RUN cp terraform /usr/local/bin/
2 changes: 1 addition & 1 deletion web-client/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pipeline {
}

def deployTo(env) {
def runner = docker.build 'deploy', '-f web-client/Dockerfile.terraform .'
def runner = docker.build 'deploy', '-f web-client/Dockerfile.deploy .'
runner.inside('-v /home/tomcat:/home/tomcat') {
dir('web-client') {
sh 'npm i'
Expand Down
5 changes: 2 additions & 3 deletions web-client/verify-sonarqube-passed.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FULL_URL="https://sonarcloud.io"
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
sonar-scanner -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.organization=flexion-github -Dsonar.projectBaseDir=. -Dsonar.login=${SONAR_TOKEN} -Dsonar.host.url=$FULL_URL
sonar-scanner -Dsonar.branch.name=${branch_name} -Dsonar.organization=flexion-github -Dsonar.projectBaseDir=. -Dsonar.login=${SONAR_TOKEN} -Dsonar.host.url=$FULL_URL
sleep 5
PROJECT_KEY=$(grep sonar.projectKey sonar-project.properties | sed 's/sonar.projectKey=\(.*\)/\1/')
CURL_URL="$FULL_URL/api/qualitygates/project_status?projectKey=$PROJECT_KEY&branch=${BRANCH_NAME}"
CURL_URL="$FULL_URL/api/qualitygates/project_status?projectKey=$PROJECT_KEY&branch=${branch_name}"
JSON=$(curl -u admin:$SONAR_PASSWORD -X GET -H 'Accept: application/json' $CURL_URL)
STATUS=$(echo $JSON | jq -r ".projectStatus.status")
if [[ $STATUS == 'ERROR' ]] ; then
Expand Down