Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from SmartColumbusOS/fix_jenkins
Browse files Browse the repository at this point in the history
add hex auth to build process
  • Loading branch information
bbalser committed Mar 18, 2019
2 parents f7f1c84 + ce50b3e commit e302bbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM bitwalker/alpine-elixir:1.8.1
ARG HEX_TOKEN
COPY . /app
WORKDIR /app
RUN mix local.hex --force \
&& mix local.rebar --force \
&& mix hex.organization auth smartcolumbus_os --key ${HEX_TOKEN} \
&& mix deps.get \
&& mix test \
&& mix format --check-formatted \
Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ node('infrastructure') {
scos.doCheckoutStage()

stage('Build') {
image = docker.build("smart_city_registry:${env.GIT_COMMIT_HASH}")
withCredentials([string(credentialsId: 'hex-read', variable: 'HEX_TOKEN')]) {
image = docker.build("smart_city_registry:${env.GIT_COMMIT_HASH}", "--build-arg HEX_TOKEN=$HEX_TOKEN .")
}
}

scos.doStageIf(scos.changeset.isRelease, "Publish") {
Expand Down

0 comments on commit e302bbb

Please sign in to comment.