diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 4164ba8da..de38ac0c0 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -187,8 +187,7 @@ package for linux amd64: - "*.deb" - "*.rpm" -# Build a FB Docker image with CI/CD and push to the GitLab registry. -build container fb: +build amd container fb: stage: build needs: - "build for linux amd64" @@ -200,7 +199,23 @@ build container fb: - echo "${DOCKER_DEPLOY_TOKEN}" | docker login -u ${DOCKER_DEPLOY_USER} --password-stdin ${CI_REGISTRY} script: - tag=${CI_REGISTRY_IMAGE}/server:${CI_COMMIT_REF_SLUG} - - docker build --build-arg GO_VERSION=$GOVERSION -t $tag -f .gitlab/Dockerfile . + - docker build --build-arg GO_VERSION=$GOVERSION --build-arg ARCH=amd64 -t $tag -f .gitlab/Dockerfile . + - docker push $tag + - echo Created docker featurebase image with tag "$tag" + +build arm container fb: + stage: build + needs: + - "build for linux arm64" + tags: + - shell + rules: + - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' + before_script: + - echo "${DOCKER_DEPLOY_TOKEN}" | docker login -u ${DOCKER_DEPLOY_USER} --password-stdin ${CI_REGISTRY} + script: + - tag=${CI_REGISTRY_IMAGE}/server-arm:${CI_COMMIT_REF_SLUG} + - docker build --build-arg GO_VERSION=$GOVERSION --build-arg ARCH=arm64 -t $tag -f .gitlab/Dockerfile . - docker push $tag - echo Created docker featurebase image with tag "$tag" diff --git a/.gitlab/Dockerfile b/.gitlab/Dockerfile index b041f58ce..754087a7a 100644 --- a/.gitlab/Dockerfile +++ b/.gitlab/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /featurebase RUN apk add --no-cache curl jq COPY NOTICE . -COPY featurebase_linux_amd64 . +COPY featurebase_linux_${ARCH} . RUN chmod ugo+x . EXPOSE 10101