Skip to content

Commit b26d276

Browse files
committed
Build tweaks
1 parent 9ad594a commit b26d276

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

Jenkinsfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,29 +141,24 @@ pipeline {
141141
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
142142
}
143143
}
144-
/*
145144
stage('MultiArch Build') {
146145
when {
147-
allOf {
148-
branch 'master'
149-
not {
150-
equals expected: 'UNSTABLE', actual: currentBuild.result
151-
}
146+
not {
147+
equals expected: 'UNSTABLE', actual: currentBuild.result
152148
}
153149
}
154150
steps {
155151
withCredentials([string(credentialsId: 'npm-sentry-dsn', variable: 'SENTRY_DSN')]) {
156152
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
153+
// Docker Login
157154
sh "docker login -u '${duser}' -p '${dpass}'"
158-
// Buildx to local files
159-
// sh './scripts/buildx -o type=local,dest=docker-build'
160-
// Buildx to with push
155+
// Buildx with push from cache
161156
sh "./scripts/buildx --push ${BUILDX_PUSH_TAGS}"
157+
// sh './scripts/buildx -o type=local,dest=docker-build'
162158
}
163159
}
164160
}
165161
}
166-
*/
167162
stage('Docs Deploy') {
168163
when {
169164
allOf {

scripts/buildx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#!/bin/bash -e
1+
#!/bin/bash
22

33
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
. "$DIR/.common.sh"
55

66
echo -e "${BLUE}${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"
77

8-
cd "${DIR}/.."
8+
cd "${DIR}/.." || exit 1
99

1010
# determine commit if not already set
1111
if [ "$BUILD_COMMIT" == "" ]; then
@@ -31,6 +31,7 @@ docker buildx build \
3131
$@ \
3232
.
3333

34+
rc=$?
3435
docker buildx rm "${BUILDX_NAME:-npm}"
35-
3636
echo -e "${BLUE}${GREEN}Multiarch build Complete${RESET}"
37+
exit $rc

0 commit comments

Comments
 (0)