Skip to content

Commit e27da10

Browse files
committed
Updating build container to move packaged artifacts to build-mount volume
1 parent 6bd977f commit e27da10

File tree

6 files changed

+27
-2
lines changed

6 files changed

+27
-2
lines changed

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ RUN \
2727
# Add the code
2828
WORKDIR /s2client-api
2929
ADD downloads/s2client-api .
30-
ADD api-*.sh .
30+
ADD api-*.sh /s2client-api/
3131

3232
ENTRYPOINT [ "/bin/bash" ]

build/all.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
#!/usr/bin/env bash
22

3-
./clone.sh && ./make-container.sh
3+
# Clones the git repo, makes the build container, builds the API and copies the
4+
# artifacts to the build-mount volume
5+
./clone.sh && ./make-container.sh && ./build-copy.sh

build/api-all.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./api-build.sh && ./api-package.sh && ./api-copy.sh

build/api-copy.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
echo "Copying built artifacts into /build-mount"
3+
ls /s2client-api/s2client-api-*
4+
cp /s2client-api/s2client-api-* /build-mount/

build/api-package.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
VERSION=3.16.1
3+
PACKAGE=s2client-api-${VERSION}.tgz
4+
5+
6+
rm -f ${PACKAGE}*
7+
8+
pushd build/bin
9+
tar -zcvf ../../${PACKAGE} *
10+
popd
11+
md5sum ${PACKAGE} > ${PACKAGE}.md5sum

build/build-copy.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
VERSION=3.16.1
4+
5+
# Build the API artifacts in the build-mount folder
6+
docker run -it -v build-mount:/build-mount --entrypoint="/s2client-api/api-all.sh" s2client-api

0 commit comments

Comments
 (0)