Commit cb1eca4e authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Merge branch 'sans933_create_conda_package' into 'next'

Sans933 create conda package

See merge request sns-hfir-scse/sans/sans-backend!973
parents 1093958a 51561cef
Loading
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ stages:
  - flake8
  - dockerbuild
  - test
  - publish
  - analysis-update

flake8-feature:
@@ -52,9 +53,9 @@ dockerbuild:
    - docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
    # kickstart or $CI_COMMIT_REF_SLUG
    - docker build -f dockerfiles/Dockerfile.kickstart --build-arg PROFILE=${PROFILE} -t $DOCKER_TAG_BASE:$DOCKER_DATE .
    - docker tag $DOCKER_TAG_BASE:$DOCKER_DATE $DOCKER_TAG_BASE:latest
    - docker tag $DOCKER_TAG_BASE:$DOCKER_DATE $DOCKER_TAG_BASE
    - docker push $DOCKER_TAG_BASE:$DOCKER_DATE
    - docker push $DOCKER_TAG_BASE:latest
    - docker push $DOCKER_TAG_BASE
    # - sed -i "s|CONTAINER_URL|$CONTAINER_URL|" scripts/sans-backend-run.sh
    - sudo chown -R gitlab-runner .
  only:
@@ -245,6 +246,20 @@ create-wheel:
  tags:
    - rse-multi-builder

publish-package:
  stage: publish
  dependencies:
    - create-wheel
    - dockerbuild
  before_script:
    - sudo chmod +x scripts/exec_script_on_docker.sh
  script:
    - bash scripts/exec_script_on_docker.sh publish_package.sh
  tags:
    - rse-multi-builder
  only:
    - main

deploy-dev:
  stage: analysis-update
  inherit:
+3 −2
Original line number Diff line number Diff line
@@ -27,5 +27,6 @@ test:

about:
  home: 
  license:
  license_file:
  license: GPL (version 3)
  license_family: GPL3
  license_file: ../LICENSE
+13 −0
Original line number Diff line number Diff line
#! /usr/bin/env bash
set -e

SCRIPT=$1

sudo rm -rf /tmp/sans-backend || true
sudo mkdir -p /tmp/sans-backend
sudo cp -r . /tmp/sans-backend
sudo chmod 777 /tmp/sans-backend
pushd /tmp/sans-backend
docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
time docker pull $CONTAINER_URL
time docker run -v /SNS:/SNS -v /HFIR:/HFIR -v $PWD:/opt/sans-backend -t $CONTAINER_URL bash -c "bash /opt/sans-backend/${SCRIPT}"
+15 −0
Original line number Diff line number Diff line
# Build conda library
set -e

echo GITHUB REF $CI_COMMIT_REF_SLUG
conda install -y anaconda-client conda-build conda-verify
cd conda.recipe
conda build --output-folder . . -c neutrons -c mantid/label/nightly

# Verify
conda-verify ./linux-64/drtsans-*.tar.bz2

# Deploy to Anaconda
CONDA_LABEL="main"
echo pushing $CI_COMMIT_REF_SLUG with label $CONDA_LABEL
anaconda upload --label $CONDA_LABEL ./linux-64/drtsans-*.tar.bz2