Created
February 26, 2018 16:18
-
-
Save peteruhnak/dc25bde74711ac3dc985e0a14c805b57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
TOOLS_DEPS: "zip unzip" | |
DEFAULT_DEPS: "libc6:i386 libuuid1:i386 libfreetype6:i386 libssl1.0.0:i386" | |
PHARO_DEPS: "$DEFAULT_DEPS libcairo2:i386" | |
S3_BUCKET: "XXX" | |
AWS_DEFAULT_REGION: "XXX" | |
ARTIFACTS: '../../../../../artifacts/$CI_RUNNER_ID/$CI_PROJECT_PATH/$CI_PIPELINE_ID' | |
ARTIFACT_DIR: 'nsp-$CI_JOB_ID' | |
SMALLTALK_EDGE_SOURCE: 'peteruhnak/smalltalkCI' | |
SMALLTALK_EDGE_BRANCH: 'gitlab-coverage-2' | |
cache: | |
paths: | |
- $SMALLTALK_CI_BUILD_BASE/pharo-local/package-cache | |
stages: | |
- install | |
- build | |
- deploy | |
install: | |
stage: install | |
# Set 32bit and update apt | |
script: | |
- mkdir -p $ARTIFACTS | |
- sudo dpkg --add-architecture i386 | |
- sudo apt-get update -yqq | |
# Install dependencies | |
- echo "Installing dependencies" | |
- sudo apt-get install -y --no-install-recommends $TOOLS_DEPS | |
- sudo apt-get install -y --no-install-recommends $PHARO_DEPS | |
# Install smalltalkCI | |
- echo 'Downloading and extracting smalltalkCI' | |
- wget -q -O smalltalkCI.zip https://github.com/$SMALLTALK_EDGE_SOURCE/archive/$SMALLTALK_EDGE_BRANCH.zip | |
- unzip -q -o smalltalkCI.zip | |
- cp -r smalltalkCI-* $ARTIFACTS | |
build: | |
stage: build | |
script: | |
- cp -r $ARTIFACTS/* . | |
- cd smalltalkCI-*; source env_vars; cd - | |
- $SMALLTALK_CI_HOME/run.sh -s "Pharo-6.0" | |
- cp -r smalltalkCI-* $ARTIFACTS | |
reports: | |
stage: deploy | |
allow_failure: true | |
script: | |
- cp -r $ARTIFACTS/* . | |
- cd smalltalkCI-*; source env_vars; cd - | |
- export SMALLTALK_CI_BUILD="$(find $SMALLTALK_CI_BUILD_BASE -mindepth 1 -maxdepth 1)" | |
- export SMALLTALK_CI_GIT="${SMALLTALK_CI_BUILD}/git_cache" | |
- export SMALLTALK_CI_IMAGE="${SMALLTALK_CI_BUILD}/TravisCI.image" | |
- export SMALLTALK_CI_CHANGES="${SMALLTALK_CI_BUILD}/TravisCI.changes" | |
- export SMALLTALK_CI_VMS="${SMALLTALK_CI_CACHE}/vms" | |
- aws s3 cp "${SMALLTALK_CI_BUILD}/coveralls_results.json" s3://$S3_BUCKET/$CI_PROJECT_PATH/$CI_JOB_ID/coveralls_results.json | |
deploy: | |
stage: deploy | |
script: | |
- cp -r $ARTIFACTS/* . | |
- cd smalltalkCI-*; source env_vars; cd - | |
- export SMALLTALK_CI_BUILD="$(find $SMALLTALK_CI_BUILD_BASE -mindepth 1 -maxdepth 1)" | |
- export SMALLTALK_CI_GIT="${SMALLTALK_CI_BUILD}/git_cache" | |
- export SMALLTALK_CI_IMAGE="${SMALLTALK_CI_BUILD}/TravisCI.image" | |
- export SMALLTALK_CI_CHANGES="${SMALLTALK_CI_BUILD}/TravisCI.changes" | |
- export SMALLTALK_CI_VMS="${SMALLTALK_CI_CACHE}/vms" | |
- eval $(ssh-agent -s) | |
- mkdir -p ~/.ssh | |
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/key | |
- chmod 600 ~/.ssh/key | |
- ssh-add ~/.ssh/key | |
- echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts | |
- ./scripts/copy-image.sh $SMALLTALK_CI_IMAGE $ARTIFACT_DIR/nsp | |
- ./scripts/mark-image.sh $ARTIFACT_DIR/nsp | |
- ./scripts/mark-version.sh $ARTIFACT_DIR/nsp | |
- ./scripts/configure-settings.sh $ARTIFACT_DIR/nsp | |
- ./scripts/deploy.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment