Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install yarn on a CI self-hosted worker #221

Closed
andor0 opened this issue Oct 22, 2021 · 4 comments
Closed

Install yarn on a CI self-hosted worker #221

andor0 opened this issue Oct 22, 2021 · 4 comments

Comments

@andor0
Copy link
Contributor

andor0 commented Oct 22, 2021

Motivation

There is Markdown linter (https://github.com/remarkjs/remark), it requires yarn.
I plan to add remark check in CI (#220).

Suggested Solution

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn

or

npm install --global yarn
@haroldsphinx
Copy link
Contributor

Thanks for pointing it out..I will update the runner installation to add yarn, It will come with our next runner update

@haroldsphinx
Copy link
Contributor

@andor0 DOne, you can freely add yarn or npm to your workflow

@andor0
Copy link
Contributor Author

andor0 commented Jan 12, 2022

The installed yarn looks strange.

$ yarn --version
0.32+git

$ yarn --help
Usage: yarn [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --generate-manpage=TEMPLATE
                        fill in manual page TEMPLATE
  --output=FILE         write output to FILE, instead of standard output
  -n, --no-act, --dry-run, --pretend
                        do not actually run any tests, merely print what would
                        be run
  --no-no-act, --no-dry-run, --no-pretend
                        opposite of --no-act
  -q, --quiet           be quiet, avoid progress reporting, only show errors
  --no-quiet            opposite of --quiet
  -v, --verbose         make progress reporting be more verbose ("wall of
                        text"), instead of a one-line status info; this is
                        turned automatically if there is not terminal
  --no-verbose          opposite of --verbose
  -s SHELL-LIBRARY, --shell-library=SHELL-LIBRARY
                        include a shell library for the IMPLEMENTS sections to
                        use
  -r SCENARIO, --run=SCENARIO
                        run only SCENARIO (this option can be repeated)
  --tempdir=DIR         use DIR as the temporary directory for tests; it
                        should be empty or not exist
  --env=NAME=VALUE      add NAME=VALUE to the environment when tests are run
  --snapshot            make snapshots of test working directory after each
                        scenario step; you probably want to use this with
                        --tempdir
  --no-snapshot         opposite of --snapshot
  --timings             report wall clock time for each scenario and step
  --no-timings          opposite of --timings
  --allow-missing-steps
                        allow scenarios to reference steps that do not exist,
                        by warning about them, but otherwise ignoring the
                        scenarios
  --no-allow-missing-steps
                        opposite of --allow-missing-steps
  --require-assumptions
                        require ASSUMING to always pass
  --no-require-assumptions
                        opposite of --require-assumptions
  --shell=SHELL         run IMPLEMENTS using SHELL
  --shell-arg=ARG       use ARG when running shell
  --cd-datadir          change to DATADIR when running commands
  --no-cd-datadir       opposite of --cd-datadir
  --stop-on-first-fail  stop if any scenario step fails, don't run more
                        scenarios
  --no-stop-on-first-fail
                        opposite of --stop-on-first-fail

  Configuration files and settings:
    --dump-setting-names
                        write out all names of settings and quit
    --dump-config       write out the entire current configuration
    --no-default-configs
                        clear list of configuration files to read
    --config=FILE       add FILE to config files
    --list-config-files
                        list all possible config files
    --help-all          show all options

  Logging:
    --log=FILE          write log entries to FILE (default is to not write log
                        files at all); use "syslog" to log to system log,
                        "stderr" to log to the standard error output, or
                        "none" to disable logging
    --log-level=LEVEL   log at LEVEL, one of debug, info, warning, error,
                        critical, fatal (default: debug)
    --log-max=SIZE      rotate logs larger than SIZE, zero for never (default:
                        0)
    --log-keep=N        keep last N logs (10)
    --log-mode=MODE     set permissions of new log files to MODE (octal;
                        default 0600)

  Peformance:
    --dump-memory-profile=METHOD
                        make memory profiling dumps using METHOD, which is one
                        of: none, or simple (no meliae support
                        anymore)(default: simple)
    --memory-dump-interval=SECONDS
                        make memory profiling dumps at least SECONDS apart

I use such yarn:

$ yarn --version
1.22.17

$ yarn --help
warning package.json: No license field

  Usage: yarn [command] [flags]

  Displays help information.

  Options:

    --cache-folder <path>               specify a custom folder that must be used to store the yarn cache
    --check-files                       install will verify file tree of packages for consistency
    --cwd <cwd>                         working directory to use (default: /tmp/1)
    --disable-pnp                       disable the Plug'n'Play installation
    --emoji [bool]                      enable emoji in output (default: false)
    --enable-pnp, --pnp                 enable the Plug'n'Play installation
    --flat                              only allow one version of a package
    --focus                             Focus on a single workspace by installing remote copies of its sibling workspaces.
    --force                             install and build packages even if they were built before, overwrite lockfile
    --frozen-lockfile                   don't generate a lockfile and fail if an update is needed
    --global-folder <path>              specify a custom folder to store global packages
    --har                               save HAR output of network traffic
    --https-proxy <host>                
    --ignore-engines                    ignore engines check
    --ignore-optional                   ignore optional dependencies
    --ignore-platform                   ignore platform checks
    --ignore-scripts                    don't run lifecycle scripts
    --json                              format Yarn log messages as lines of JSON (see jsonlines.org)
    --link-duplicates                   create hardlinks to the repeated modules in node_modules
    --link-folder <path>                specify a custom folder to store global links
    --modules-folder <path>             rather than installing modules into the node_modules folder relative to the cwd, output them here
    --mutex <type>[:specifier]          use a mutex to ensure only one yarn instance is executing
    --network-concurrency <number>      maximum number of concurrent network requests
    --network-timeout <milliseconds>    TCP timeout for network requests
    --no-bin-links                      don't generate bin links when setting up packages
    --no-default-rc                     prevent Yarn from automatically detecting yarnrc and npmrc files
    --no-lockfile                       don't read or generate a lockfile
    --non-interactive                   do not show interactive prompts
    --no-node-version-check             do not warn when using a potentially unsupported Node version
    --no-progress                       disable progress bar
    --offline                           trigger an error if any required dependencies are not available in local cache
    --otp <otpcode>                     one-time password for two factor authentication
    --prefer-offline                    use network only if dependencies are not available in local cache
    --preferred-cache-folder <path>     specify a custom folder to store the yarn cache if possible
    --prod, --production [prod]         
    --proxy <host>                      
    --pure-lockfile                     don't generate a lockfile
    --registry <url>                    override configuration registry
    -s, --silent                        skip Yarn console logs, other types of logs (script output) will be printed
    --scripts-prepend-node-path [bool]  prepend the node executable dir to the PATH in scripts
    --skip-integrity-check              run install without checking if node_modules is installed
    --strict-semver                     
    --update-checksums                  update package checksums from current repository
    --use-yarnrc <path>                 specifies a yarnrc file that Yarn should use (.yarnrc only, not .npmrc) (default: )
    -v, --version                       output the version number
    --verbose                           output verbose messages on internal operations
    -h, --help                          output usage information
  Commands:
    - access
    - add
    - audit
    - autoclean
    - bin
    - cache
    - check
    - config
    - create
    - exec
    - generate-lock-entry / generateLockEntry
    - global
    - help
    - import
    - info
    - init
    - install
    - licenses
    - link
    - list
    - login
    - logout
    - node
    - outdated
    - owner
    - pack
    - policies
    - publish
    - remove
    - run
    - tag
    - team
    - unlink
    - unplug
    - upgrade
    - upgrade-interactive / upgradeInteractive
    - version
    - versions
    - why
    - workspace
    - workspaces

  Run `yarn help COMMAND` for more information on specific commands.
  Visit https://yarnpkg.com/en/docs/cli/ to learn more about Yarn.

@KaiserKarel
Copy link
Contributor

Oh seems like a very old version on the runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants