diff --git a/server/build/contrib/gitlab/.gitlab-ci.yml b/server/build/contrib/gitlab/.gitlab-ci.yml deleted file mode 100644 index 92818e9a5e..0000000000 --- a/server/build/contrib/gitlab/.gitlab-ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -lint: - allow_failure: true - image: golangci/golangci-lint - script: - - GO111MODULE=off GOBIN=$PWD/bin go get -u github.com/mattermost/mattermost-govet - - make config-reset - - make check-style - -test-quick: - image: docker - variables: - DOCKER_HOST: tcp://docker:2375 - DOCKER_TLS_CERTDIR: "" - TEST_DATABASE_MYSQL_DSN: "mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s&multiStatements=true&maxAllowedPacket=4194304" - TEST_DATABASE_POSTGRESQL_DSN: "postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10" - TEST_DATABASE_MYSQL_ROOT_PASSWD: "mostest" - services: - - docker:dind - before_script: - - apk add --no-cache bash docker-compose go make - - make start-docker - script: - - docker run - --env MM_NO_DOCKER=true - --env-file "build/dotenv/test.env" - --mount "type=bind,source=$PWD,target=$PWD" - --network "$CI_PROJECT_NAME"_mm-test - docker - /bin/sh -c " - cd $PWD; - apk add --no-cache bash docker-compose go mailcap make; - make test-server-quick; - " - -test-full: - rules: - - if: '$CI_COMMIT_REF_NAME == "master"' - image: docker - variables: - DOCKER_HOST: tcp://docker:2375 - DOCKER_TLS_CERTDIR: "" - TEST_DATABASE_MYSQL_DSN: "mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s&multiStatements=true&maxAllowedPacket=4194304" - TEST_DATABASE_POSTGRESQL_DSN: "postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10" - TEST_DATABASE_MYSQL_ROOT_PASSWD: "mostest" - services: - - docker:dind - before_script: - - apk add --no-cache bash docker-compose go make - - make start-docker - script: - - docker run - --env MM_NO_DOCKER=true - --env-file "build/dotenv/test.env" - --mount "type=bind,source=$PWD,target=$PWD" - --network "$CI_PROJECT_NAME"_mm-test - docker - /bin/sh -c " - cd $PWD; - apk add --no-cache bash docker-compose go mailcap make; - make test-server; - " diff --git a/server/build/contrib/gitlab/README.md b/server/build/contrib/gitlab/README.md deleted file mode 100644 index f94e7b5fe9..0000000000 --- a/server/build/contrib/gitlab/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# GitLab CI/CD configuration for Mattermost - -The [.gitlab-ci.yml](./.gitlab-ci.yml) file in this directory provides a [GitLab CI/CD configuration file](https://docs.gitlab.com/ee/ci/yaml/gitlab_ci_yaml.html) that can be used to run linting and unit testing for the Mattermost application. - -## Usage - -To configure your GitLab instance to use this configuration file (and without having to move it to the base directory in this git repository), you can configure the [`CI_CONFIG_PATH` predefined variable](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) for the repository in GitLab with the configuration file path (`build/contrib/gitlab/.gitlab-ci.yml`). diff --git a/webapp/channels/.gitlab-ci.yml b/webapp/channels/.gitlab-ci.yml deleted file mode 100644 index 631c151e28..0000000000 --- a/webapp/channels/.gitlab-ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -stages: - - test - - build - - s3 - - trigger - -variables: - IMAGE_BUILD_WEBAPP: $CI_REGISTRY/mattermost/ci/devops-images/mattermost-build-webapp:20220802_node-16.10.0@sha256:3272aa759f10c2ef1719ed08cc82ddb07224bec5be86f09800c72f5e2a623c3d - BUILD: "yes" - TEST: "yes" - -include: - - project: mattermost/ci/mattermost-webapp - ref: master - file: private.yml - -empty: - stage: test - script: - - echo "empty" - -test: #todo check on how to create junit.xml, there currently is none - stage: test - image: ${IMAGE_BUILD_WEBAPP} - cache: - key: - files: - - package.json - prefix: ${CI_COMMIT_REF_SLUG} - paths: - - .npm/ - before_script: - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client git -y )' - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY_GITHUB" | tr -d '\r' | ssh-add - - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - ssh-keyscan github.com >> ~/.ssh/known_hosts - - chmod 644 ~/.ssh/known_hosts - script: - - npm ci --cache .npm --prefer-offline - - # For Playwright type check - - (cd e2e/playwright && npm ci --cache .npm --prefer-offline) - - # i18n - - cp i18n/en.json /tmp/en.json - - mkdir -p /tmp/fake-mobile-dir/assets/base/i18n/ - - echo '{}' > /tmp/fake-mobile-dir/assets/base/i18n/en.json - - - npm run mmjstool -- i18n extract-webapp --webapp-dir . --mobile-dir /tmp/fake-mobile-dir - - diff /tmp/en.json i18n/en.json - # Address weblate behavior which does not remove whole translation item when translation string is set to empty - - npm run mmjstool -- i18n clean-empty --webapp-dir . --mobile-dir /tmp/fake-mobile-dir --check - - npm run mmjstool -- i18n check-empty-src --webapp-dir . --mobile-dir /tmp/fake-mobile-dir - - - rm -rf tmp - - # typescript - - npm run check-types - - # lint - - npm run check - - # unit tests - - npm run test-ci - timeout: 3 hours - rules: - - if: '$CI_COMMIT_REF_NAME == "master" && $TEST == "yes"' diff --git a/webapp/channels/build/contrib/gitlab/.gitlab-ci.yml b/webapp/channels/build/contrib/gitlab/.gitlab-ci.yml deleted file mode 100644 index 9d9bb1c246..0000000000 --- a/webapp/channels/build/contrib/gitlab/.gitlab-ci.yml +++ /dev/null @@ -1,16 +0,0 @@ -lint: - allow_failure: true - image: node:buster - before_script: - - npm ci --ignore-scripts - - (cd e2e/playwright && npm ci --ignore-scripts) - script: - - npm run check-types - - npm run check - -test: - image: node:buster - before_script: - - npm ci --ignore-scripts - script: - - npm run test diff --git a/webapp/channels/build/contrib/gitlab/README.md b/webapp/channels/build/contrib/gitlab/README.md deleted file mode 100644 index f94e7b5fe9..0000000000 --- a/webapp/channels/build/contrib/gitlab/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# GitLab CI/CD configuration for Mattermost - -The [.gitlab-ci.yml](./.gitlab-ci.yml) file in this directory provides a [GitLab CI/CD configuration file](https://docs.gitlab.com/ee/ci/yaml/gitlab_ci_yaml.html) that can be used to run linting and unit testing for the Mattermost application. - -## Usage - -To configure your GitLab instance to use this configuration file (and without having to move it to the base directory in this git repository), you can configure the [`CI_CONFIG_PATH` predefined variable](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) for the repository in GitLab with the configuration file path (`build/contrib/gitlab/.gitlab-ci.yml`).