Commit 08fcc6b7 authored by Michael Kriese's avatar Michael Kriese
Browse files

Merge branch 'main' into 'ci/mr-jobs'

# Conflicts:
#   .gitlab-ci.yml
parents 5b666e68 a167f8ae
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/node_modules
yarn-error.log
.npm
+54 −11
Original line number Diff line number Diff line
include: '/templates/renovate-dind.gitlab-ci.yml'
include: '/templates/renovate.gitlab-ci.yml'

variables:
  RENOVATE_GIT_AUTHOR: Renovate Bot <bot@renovateapp.com>

stages:
  - test
  - deploy

renovate_dry-run:
workflow:
  rules:
    # Don't build push pipeline when open MR and not renovate branch
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_COMMIT_BRANCH !~ /^renovate\//
      when: never
    # Don't build MR pipeline when renovate branch
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_BRANCH =~ /^renovate\//
      when: never
    # Don't build tags
    - if: $CI_COMMIT_TAG
      when: never
    - when: always

renovate:dry-run:
  variables:
    RENOVATE_USERNAME: $GITLAB_USER_LOGIN
    RENOVATE_BRANCH_PREFIX: ${GITLAB_USER_LOGIN}-renovate/
@@ -13,20 +29,47 @@ renovate_dry-run:
    - export "RENOVATE_TOKEN=${CI_JOB_TOKEN}"
    - echo "running on GitLab v${RENOVATE_X_SERVER_VERSION}"
    - if [[ "$RENOVATE_TOKEN" == "$CI_JOB_TOKEN" ]]; then echo "using CI_JOB_TOKEN"; else echo "using RENOVATE_TOKEN"; fi
    - renovate --dry-run=true $RENOVATE_EXTRA_FLAGS
    - renovate --dry-run=full $RENOVATE_EXTRA_FLAGS
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
    - if: $CI_PIPELINE_SOURCE == "schedule"
      when: never
    - if: '$CI_COMMIT_BRANCH'
    - when: always

lint:
  image: ghcr.io/containerbase/node:18.15.0@sha256:bc1d224c353636358e204adbe170f6121843f776eccf5cd0527c71f2cd6d707c
  cache:
    key:
      files:
        - package-lock.json
    paths:
      - .npm/
  before_script:
    - npm ci --cache .npm --prefer-offline
  script:
    - npm run prettier
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
      when: never
    - when: always

release:
  image: renovate/node:14.17.5@sha256:f31e565f27fa2832e26be5376ea94ea93d5c69dbe949a65fcba990a364670483
  stage: deploy
  cache: []
  image: ghcr.io/containerbase/node:18.15.0@sha256:bc1d224c353636358e204adbe170f6121843f776eccf5cd0527c71f2cd6d707c
  stage: release
  cache:
    key:
      files:
        - package-lock.json
    paths:
      - .npm/
  variables:
    GIT_AUTHOR_EMAIL: bot@renovateapp.com
    GIT_COMMITTER_EMAIL: bot@renovateapp.com
  before_script:
    - npm ci
    - npm ci --cache .npm --prefer-offline
  script:
    - git config --global --add safe.directory $PWD
    - npx --no-install semantic-release
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
    - if: $CI_PIPELINE_SOURCE == "schedule"
      when: never
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

.gitpod.yml

0 → 100644
+7 −0
Original line number Diff line number Diff line
tasks:
  - init: npm ci --cache .npm --prefer-offline

vscode:
  extensions:
    - esbenp.prettier-vscode
    - GitLab.gitlab-workflow

.npmrc

0 → 100644
+1 −0
Original line number Diff line number Diff line
save-exact = true
+7 −1
Original line number Diff line number Diff line
@@ -2,8 +2,14 @@
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/gitlab"
    [
      "@semantic-release/gitlab",
      {
        "successComment": false
      }
    ]
  ],
  "preset": "conventionalcommits",
  "branches": [
    {
      "name": "main"
Loading