Yrkki/cv-generator-fe

View on GitHub
bitbucket-pipelines.yml

Summary

Maintainability
Test Coverage
# This is a sample build configuration for Other.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
# image: atlassian/default-image:2

# Use chromium provided by puppeteer.
# See https://github.com/GoogleChrome/puppeteer for code example.

# Installing chromium on its own is not enough, we also need a few other dependencies.
# See https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md - 'Running Puppeteer in Docker' for chromium install instructions.

image: node:lts

options:
  max-time: 40

pipelines:
  default:
    - step:
        name: Run pipeline
        caches:
          - node
        script:
          - if [ "$(date +%u)" -eq 5 ]; then echo Proceeding to pipeline on a Friday...; else echo Skipping pipeline on a non-Friday savings day. && exit; fi
          - echo "Starting pipeline..."
          #
          - apt-get update && apt-get install -yq libgconf-2-4
          - >
            apt-get update && apt-get install -y wget --no-install-recommends && \
              wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -  && \
              sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
              apt-get update && \
              apt-get install -y google-chrome-unstable --no-install-recommends
              # Dont worry about cleaning up files left after installation.
          - echo 'CHROME_BIN was at:' $CHROME_BIN
          # - export CHROME_BIN=google-chrome
          - export CHROME_BIN=$( which google-chrome )
          - echo 'CHROME_BIN now at:' $CHROME_BIN
          #
          - node --version
          - npm --version
          #
          - npm install --legacy-peer-deps
          - npm run build
          #
          - echo "Pipeline finished."
          - echo "Everything is awesome!"
        # artifacts:
        #   - example.png