File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
.devops/Codebuild/Buildspecs Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+ phases :
3
+ install :
4
+ commands :
5
+ - echo Setup environment...
6
+ - export CODEBUILD_GIT_TAG="$(git describe --tags --exact-match 2>/dev/null)"
7
+ pre_build :
8
+ commands :
9
+ - echo logging in to ECR...
10
+ - $(aws ecr get-login --no-include-email --region us-east-1)
11
+ - docker pull 758272223864.dkr.ecr.us-east-1.amazonaws.com/git-release-notes:master
12
+ build :
13
+ commands :
14
+ - echo build Docker image redshelf-cfi-js:${CODEBUILD_GIT_TAG}
15
+ - docker build --build-arg NPM_TOKEN=${NPM_TOKEN} --cache-from 758272223864.dkr.ecr.us-east-1.amazonaws.com/git-release-notes:master -t git-release-notes:${CODEBUILD_GIT_TAG} .
16
+ - docker tag git-release-notes:${CODEBUILD_GIT_TAG} 758272223864.dkr.ecr.us-east-1.amazonaws.com/git-release-notes:${CODEBUILD_GIT_TAG}
17
+ - echo build Docker image git-release-notes:${CODEBUILD_GIT_TAG} complete `date`
18
+ post_build :
19
+ commands :
20
+ - echo build Docker images complete `date`
21
+ - echo push Docker images to ECR...
22
+ - docker run -e "NPM_TOKEN=${NPM_TOKEN}" 758272223864.dkr.ecr.us-east-1.amazonaws.com/git-release-notes:${CODEBUILD_GIT_TAG} bash -c "npm --no-git-tag-version version ${CODEBUILD_GIT_TAG} && npm publish --tag ${CODEBUILD_GIT_TAG}"
23
+ - docker push 758272223864.dkr.ecr.us-east-1.amazonaws.com/redshelf-cfi-js:${CODEBUILD_GIT_TAG}
Original file line number Diff line number Diff line change 1
- FROM redshelf/chrome-node:nvm
1
+ FROM ubuntu:16.04
2
+ SHELL ["/bin/bash" , "-c" ]
3
+
4
+ ENV NVM_DIR $HOME/.nvm
5
+ ENV NODE_VERSION 6.9.4
6
+ ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
7
+
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ git \
11
+ wget \
12
+ unzip && \
13
+ wget https://s3.amazonaws.com/redshelf-apt-repo/google-chrome-stable_65.0.3325.162-1_amd64.deb -O /tmp/google-chrome-stable.deb && \
14
+ dpkg -i /tmp/google-chrome-stable.deb || apt-get install -y -f && \
15
+ wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip -O /tmp/chromedriver.zip && \
16
+ unzip -o /tmp/chromedriver.zip -d /usr/local/bin/ && chmod 755 /usr/local/bin/chromedriver && \
17
+ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \
18
+ source $NVM_DIR/nvm.sh && \
19
+ nvm install v6.9.4 && \
20
+ nvm alias default v6.9.4 && \
21
+ npm i -g codecov
2
22
3
23
COPY package.json /srv/app/package.json
4
24
You can’t perform that action at this time.
0 commit comments