Skip to content
Snippets Groups Projects
Commit ddc8057e authored by Sydney Anne Erickson's avatar Sydney Anne Erickson :chipmunk:
Browse files

WASM Go image

parent d57284ab
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,9 @@ imagebuild:
- cd cuda-go
- chmod +x build-all-images.sh
- ./build-all-images.sh
- cd ../wasm-go
- ./build-image.sh 1.17
variables:
#DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: "/certs"
......
FROM ubuntu:20.04
LABEL maintainer "Sydney Anne Erickson <sydney-anne@elixxir.io>"
ARG GO_VER
ENV GO_VER=$GO_VER
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt upgrade -y
RUN apt install -y software-properties-common
RUN add-apt-repository -y ppa:longsleep/golang-backports
RUN apt install -y golang-$GO_VER git libgmp-dev bc curl wget jq
RUN ln -s /usr/lib/go-$GO_VER/bin/go /usr/bin/go
RUN ln -s /usr/lib/go-$GO_VER/bin/gofmt /usr/bin/gofmt
RUN go install github.com/haya14busa/goverage@latest
RUN go install github.com/agnivade/wasmbrowsertest@latest
RUN mv /root/go/bin/wasmbrowsertest /root/go/bin/go_js_wasm_exec
COPY go-acc /usr/bin/go-acc
RUN chmod +x /usr/bin/go-acc
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc
RUN chmod +x mc
RUN mv mc /usr/bin
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && dpkg -i google-chrome-stable_current_amd64.deb && rm -rf google-chrome-stable_current_amd64.deb
COPY upload-artifacts.sh /upload-artifacts.sh
RUN chmod +x /upload-artifacts.sh
COPY b2sum-amd64-linux /b2sum-amd64-linux
RUN chmod +x /b2sum-amd64-linux
COPY upload-artifact.sh /upload-artifact.sh
RUN chmod +x /upload-artifact.sh
COPY upload-artifact-nohash.sh /upload-artifact-nohash.sh
RUN chmod +x /upload-artifact-nohash.sh
COPY hash-file.sh /hash-file.sh
RUN chmod +x /hash-file.sh
File added
set -e
GO_VER=$1
if [ -z ${skip_rollback} ]; then
# Retag current prod image with -rollback suffix, also keeping it with the original name on prod for now
docker pull docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm
docker tag docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm \
docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm-rollback
docker push docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm-rollback
fi
# Build new version and push to replace
docker build --build-arg GO_VER=$1 -t docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm .
docker push docker-registry.xx.network/elixxir/sysadmin/backend-ci:go$GO_VER-wasm
File added
echo $(/b2sum-amd64-linux -a blake2s $1 | head -n1 | awk '{print $1;}')
\ No newline at end of file
mc alias set elixxir-s3 $ARTIFACT_S3_ENDPOINT $ARTIFACT_S3_KEY $ARTIFACT_S3_SECRET
mc cp $2 elixxir-s3/$ARTIFACT_S3_BUCKET/$1/$2
\ No newline at end of file
mc alias set elixxir-s3 $ARTIFACT_S3_ENDPOINT $ARTIFACT_S3_KEY $ARTIFACT_S3_SECRET
export B2BSUM=$(/hash-file.sh $2)
mc cp $2 elixxir-s3/$ARTIFACT_S3_BUCKET/$1/$B2BSUM
\ No newline at end of file
if [ "$CI_COMMIT_REF_NAME" != "master" ] && [ "$CI_COMMIT_REF_NAME" != "release" ] && [ "$ARTIFACT_BRANCH_BYPASS" != "yes" ]; then
echo 'Branch is not master or release, aborting script';
exit 0;
fi
cd $1
mc alias set elixxir-s3 $ARTIFACT_S3_ENDPOINT $ARTIFACT_S3_KEY $ARTIFACT_S3_SECRET
mc cp * elixxir-s3/$ARTIFACT_S3_BUCKET/$CI_COMMIT_REF_NAME/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment