Kristian Amlie
5 years ago
No known key found for this signature in database
GPG Key ID: F464407C996AF03F
2 changed files with
19 additions and
4 deletions
-
.gitlab-ci.yml
-
Dockerfile
|
|
@ -112,7 +112,10 @@ publish:s3: |
|
|
|
stage: publish |
|
|
|
image: debian:buster |
|
|
|
before_script: |
|
|
|
- apt update && apt install -yyq awscli |
|
|
|
- apt update && apt install -yyq awscli curl |
|
|
|
|
|
|
|
- curl -Lo /usr/bin/mender-artifact https://d1b0l86ne08fsf.cloudfront.net/mender-artifact/${MENDER_ARTIFACT_VERSION}/linux/mender-artifact |
|
|
|
- chmod ugo+x /usr/bin/mender-artifact |
|
|
|
|
|
|
|
# Fetch artifacts from temporary S3 bucket |
|
|
|
- aws s3 cp s3://mender-gitlab-tmp-storage/$CI_PROJECT_NAME/$CI_PIPELINE_ID/deploy.tar.gz deploy.tar.gz |
|
|
@ -127,3 +130,9 @@ publish:s3: |
|
|
|
s3://$S3_BUCKET_NAME/${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz |
|
|
|
- aws s3api put-object-acl --acl public-read --bucket $S3_BUCKET_NAME |
|
|
|
--key ${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.img.xz |
|
|
|
|
|
|
|
- mender-artifact modify -n release-1 deploy/raspberrypi-${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.mender |
|
|
|
- aws s3 cp deploy/raspberrypi-${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}.mender |
|
|
|
s3://$S3_BUCKET_NAME/${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}_release-1.mender |
|
|
|
- aws s3api put-object-acl --acl public-read --bucket $S3_BUCKET_NAME |
|
|
|
--key ${RASPBIAN_NAME}/arm/${RASPBIAN_NAME}-mender-${MENDER_CLIENT_VERSION}_release-1.mender |
|
|
|
|
|
@ -47,13 +47,19 @@ RUN apt-get update && apt-get install -y \ |
|
|
|
|
|
|
|
COPY --from=build /root/pxz/pxz /usr/bin/pxz |
|
|
|
|
|
|
|
RUN wget -q -O /usr/bin/mender-artifact https://d1b0l86ne08fsf.cloudfront.net/mender-artifact/$MENDER_ARTIFACT_VERSION/linux/mender-artifact \ |
|
|
|
&& chmod +x /usr/bin/mender-artifact |
|
|
|
|
|
|
|
# allow us to keep original PATH variables when sudoing |
|
|
|
RUN echo "Defaults secure_path=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:$PATH\"" > /etc/sudoers.d/secure_path_override |
|
|
|
RUN chmod 0440 /etc/sudoers.d/secure_path_override |
|
|
|
|
|
|
|
# Turn off default filesystem feature which is supported in newer mke2fs tools, |
|
|
|
# but not in Ubuntu 16.04. The result is that mender-artifact can not be used to |
|
|
|
# modify the artifact. Once 16.04 goes out of support, this can probably be |
|
|
|
# removed. |
|
|
|
RUN sed -i -e 's/,metadata_csum//' /etc/mke2fs.conf |
|
|
|
|
|
|
|
RUN wget -q -O /usr/bin/mender-artifact https://d1b0l86ne08fsf.cloudfront.net/mender-artifact/$MENDER_ARTIFACT_VERSION/linux/mender-artifact \ |
|
|
|
&& chmod +x /usr/bin/mender-artifact |
|
|
|
|
|
|
|
WORKDIR / |
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/ |
|
|
|