BigW Consortium Gitlab

Commit c8950577 by James Lopez

Merge branch '10-8-stable-prepare-rc5' into '10-8-stable'

Prepare 10.8 RC5 release See merge request gitlab-org/gitlab-ce!18839
parents db23695d e83a4a2b
...@@ -16,8 +16,8 @@ export default { ...@@ -16,8 +16,8 @@ export default {
<icon <icon
name="git-merge" name="git-merge"
v-tooltip v-tooltip
title="__('Part of merge request changes')" :title="__('Part of merge request changes')"
css-classes="ide-file-changed-icon" css-classes="append-right-8"
:size="12" :size="12"
/> />
</template> </template>
...@@ -14,12 +14,12 @@ export default class Model { ...@@ -14,12 +14,12 @@ export default class Model {
(this.originalModel = this.monaco.editor.createModel( (this.originalModel = this.monaco.editor.createModel(
head ? head.content : this.file.raw, head ? head.content : this.file.raw,
undefined, undefined,
new this.monaco.Uri(null, null, `original/${this.file.key}`), new this.monaco.Uri(null, null, `original/${this.path}`),
)), )),
(this.model = this.monaco.editor.createModel( (this.model = this.monaco.editor.createModel(
this.content, this.content,
undefined, undefined,
new this.monaco.Uri(null, null, this.file.key), new this.monaco.Uri(null, null, this.path),
)), )),
); );
if (this.file.mrChange) { if (this.file.mrChange) {
...@@ -27,7 +27,7 @@ export default class Model { ...@@ -27,7 +27,7 @@ export default class Model {
(this.baseModel = this.monaco.editor.createModel( (this.baseModel = this.monaco.editor.createModel(
this.file.baseRaw, this.file.baseRaw,
undefined, undefined,
new this.monaco.Uri(null, null, `target/${this.file.path}`), new this.monaco.Uri(null, null, `target/${this.path}`),
)), )),
); );
} }
......
...@@ -196,6 +196,8 @@ export const unstageChange = ({ commit }, path) => { ...@@ -196,6 +196,8 @@ export const unstageChange = ({ commit }, path) => {
}; };
export const openPendingTab = ({ commit, getters, dispatch, state }, { file, keyPrefix }) => { export const openPendingTab = ({ commit, getters, dispatch, state }, { file, keyPrefix }) => {
if (getters.activeFile && getters.activeFile.key === `${keyPrefix}-${file.key}`) return false;
state.openFiles.forEach(f => eventHub.$emit(`editor.update.model.dispose.${f.key}`)); state.openFiles.forEach(f => eventHub.$emit(`editor.update.model.dispose.${f.key}`));
commit(types.ADD_PENDING_TAB, { file, keyPrefix }); commit(types.ADD_PENDING_TAB, { file, keyPrefix });
......
...@@ -43,12 +43,20 @@ module Clusters ...@@ -43,12 +43,20 @@ module Clusters
def create_and_assign_runner def create_and_assign_runner
transaction do transaction do
project.runners.create!(name: 'kubernetes-cluster', tag_list: %w(kubernetes cluster)).tap do |runner| project.runners.create!(runner_create_params).tap do |runner|
update!(runner_id: runner.id) update!(runner_id: runner.id)
end end
end end
end end
def runner_create_params
{
name: 'kubernetes-cluster',
runner_type: :project_type,
tag_list: %w(kubernetes cluster)
}
end
def gitlab_url def gitlab_url
Gitlab::Routing.url_helpers.root_url(only_path: false) Gitlab::Routing.url_helpers.root_url(only_path: false)
end end
......
...@@ -661,9 +661,15 @@ class Project < ActiveRecord::Base ...@@ -661,9 +661,15 @@ class Project < ActiveRecord::Base
return if !force && (self[:import_status] == 'none' || self[:import_status].nil?) return if !force && (self[:import_status] == 'none' || self[:import_status].nil?)
return unless import_state.nil? return unless import_state.nil?
create_import_state(import_state_args) if persisted?
create_import_state(import_state_args)
update_column(:import_status, 'none') update_column(:import_status, 'none')
else
build_import_state(import_state_args)
self[:import_status] = 'none'
end
end end
def import_schedule def import_schedule
......
...@@ -49,7 +49,7 @@ module Users ...@@ -49,7 +49,7 @@ module Users
migrate_merge_requests migrate_merge_requests
migrate_notes migrate_notes
migrate_abuse_reports migrate_abuse_reports
migrate_award_emojis migrate_award_emoji
end end
def migrate_issues def migrate_issues
...@@ -70,7 +70,7 @@ module Users ...@@ -70,7 +70,7 @@ module Users
user.reported_abuse_reports.update_all(reporter_id: ghost_user.id) user.reported_abuse_reports.update_all(reporter_id: ghost_user.id)
end end
def migrate_award_emojis def migrate_award_emoji
user.award_emoji.update_all(user_id: ghost_user.id) user.award_emoji.update_all(user_id: ghost_user.id)
end end
end end
......
---
title: Raise NoRepository error for non-valid repositories when calculating repository
checksum
merge_request: 18594
author:
type: fixed
---
title: Add database foreign key constraint between pipelines and build
merge_request: 18822
author:
type: fixed
class AddPipelineBuildForeignKey < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
execute <<~SQL
DELETE FROM ci_builds WHERE project_id IS NULL OR commit_id IS NULL
SQL
execute <<~SQL
DELETE FROM ci_builds WHERE NOT EXISTS
(SELECT true FROM ci_pipelines WHERE ci_pipelines.id = ci_builds.commit_id)
AND stage_id IS NULL
SQL
add_concurrent_foreign_key(:ci_builds, :ci_pipelines, column: :commit_id)
end
def down
return unless foreign_key_exists?(:ci_builds, :ci_pipelines, column: :commit_id)
remove_foreign_key(:ci_builds, column: :commit_id)
end
end
class MakeRemoteMirrorsDisabledByDefault < ActiveRecord::Migration
DOWNTIME = false
def up
change_column_default :remote_mirrors, :enabled, false
end
def down
change_column_default :remote_mirrors, :enabled, true
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180503200320) do ActiveRecord::Schema.define(version: 20180508055821) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
...@@ -1712,7 +1712,7 @@ ActiveRecord::Schema.define(version: 20180503200320) do ...@@ -1712,7 +1712,7 @@ ActiveRecord::Schema.define(version: 20180503200320) do
create_table "remote_mirrors", force: :cascade do |t| create_table "remote_mirrors", force: :cascade do |t|
t.integer "project_id" t.integer "project_id"
t.string "url" t.string "url"
t.boolean "enabled", default: true t.boolean "enabled", default: false
t.string "update_status" t.string "update_status"
t.datetime "last_update_at" t.datetime "last_update_at"
t.datetime "last_successful_update_at" t.datetime "last_successful_update_at"
......
...@@ -23,7 +23,7 @@ sast:container: ...@@ -23,7 +23,7 @@ sast:container:
- docker:stable-dind - docker:stable-dind
script: script:
- docker run -d --name db arminc/clair-db:latest - docker run -d --name db arminc/clair-db:latest
- docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1 - docker run -p 6060:6060 --link db:postgres -d --name clair --restart on-failure arminc/clair-local-scan:v2.0.1
- apk add -U wget ca-certificates - apk add -U wget ca-certificates
- docker pull ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} - docker pull ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG}
- wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 - wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64
......
...@@ -11,7 +11,7 @@ Ideally, the GitLab Runner should not be installed on the same machine as GitLab ...@@ -11,7 +11,7 @@ Ideally, the GitLab Runner should not be installed on the same machine as GitLab
Read the [requirements documentation](../../install/requirements.md#gitlab-runner) Read the [requirements documentation](../../install/requirements.md#gitlab-runner)
for more information. for more information.
## Shared vs specific Runners ## Shared, specific and group Runners
After [installing the Runner][install], you can either register it as shared or After [installing the Runner][install], you can either register it as shared or
specific. You can only register a shared Runner if you have admin access to specific. You can only register a shared Runner if you have admin access to
...@@ -32,6 +32,9 @@ are: ...@@ -32,6 +32,9 @@ are:
Runners. For example, if you want to deploy a certain project, you can setup Runners. For example, if you want to deploy a certain project, you can setup
a specific Runner to have the right credentials for this. The [usage of tags](#using-tags) a specific Runner to have the right credentials for this. The [usage of tags](#using-tags)
may be useful in this case. Specific Runners process jobs using a [FIFO] queue. may be useful in this case. Specific Runners process jobs using a [FIFO] queue.
- **Group Runners** are useful when you have multiple projects under one group
and would like all projects to have access to a set of Runners. Group Runners
process jobs using a [FIFO] queue.
A Runner that is specific only runs for the specified project(s). A shared Runner A Runner that is specific only runs for the specified project(s). A shared Runner
can run jobs for every project that has enabled the option **Allow shared Runners** can run jobs for every project that has enabled the option **Allow shared Runners**
...@@ -66,7 +69,7 @@ Runners to disabled. ...@@ -66,7 +69,7 @@ Runners to disabled.
## Registering a specific Runner ## Registering a specific Runner
Registering a specific can be done in two ways: Registering a specific Runner can be done in two ways:
1. Creating a Runner with the project registration token 1. Creating a Runner with the project registration token
1. Converting a shared Runner into a specific Runner (one-way, admin only) 1. Converting a shared Runner into a specific Runner (one-way, admin only)
...@@ -79,6 +82,14 @@ visit the project you want to make the Runner work for in GitLab: ...@@ -79,6 +82,14 @@ visit the project you want to make the Runner work for in GitLab:
1. Go to **Settings > CI/CD** to obtain the token 1. Go to **Settings > CI/CD** to obtain the token
1. [Register the Runner][register] 1. [Register the Runner][register]
## Registering a group Runner
Creating a group Runner requires Master permissions for the group. To create a
group Runner visit the group you want to make the Runner work for in GitLab:
1. Go to **Settings > CI/CD** to obtain the token
1. [Register the Runner][register]
### Making an existing shared Runner specific ### Making an existing shared Runner specific
If you are an admin on your GitLab instance, you can turn any shared Runner into If you are an admin on your GitLab instance, you can turn any shared Runner into
...@@ -121,7 +132,7 @@ To enable/disable a Runner in your project: ...@@ -121,7 +132,7 @@ To enable/disable a Runner in your project:
> **Note**: > **Note**:
Consider that if you don't lock your specific Runner to a specific project, any Consider that if you don't lock your specific Runner to a specific project, any
user with Master role in you project can assign your runner to another arbitrary user with Master role in you project can assign your Runner to another arbitrary
project without requiring your authorization, so use it with caution. project without requiring your authorization, so use it with caution.
An admin can enable/disable a specific Runner for projects: An admin can enable/disable a specific Runner for projects:
......
...@@ -30,6 +30,7 @@ module Gitlab ...@@ -30,6 +30,7 @@ module Gitlab
EMPTY_REPOSITORY_CHECKSUM = '0000000000000000000000000000000000000000'.freeze EMPTY_REPOSITORY_CHECKSUM = '0000000000000000000000000000000000000000'.freeze
NoRepository = Class.new(StandardError) NoRepository = Class.new(StandardError)
InvalidRepository = Class.new(StandardError)
InvalidBlobName = Class.new(StandardError) InvalidBlobName = Class.new(StandardError)
InvalidRef = Class.new(StandardError) InvalidRef = Class.new(StandardError)
GitError = Class.new(StandardError) GitError = Class.new(StandardError)
...@@ -1584,7 +1585,7 @@ module Gitlab ...@@ -1584,7 +1585,7 @@ module Gitlab
def checksum def checksum
gitaly_migrate(:calculate_checksum, gitaly_migrate(:calculate_checksum,
status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
if is_enabled if is_enabled
gitaly_repository_client.calculate_checksum gitaly_repository_client.calculate_checksum
else else
...@@ -2533,10 +2534,12 @@ module Gitlab ...@@ -2533,10 +2534,12 @@ module Gitlab
output, status = run_git(args) output, status = run_git(args)
if status.nil? || !status.zero? if status.nil? || !status.zero?
# Empty repositories return with a non-zero status and an empty output. # Non-valid git repositories return 128 as the status code and an error output
return EMPTY_REPOSITORY_CHECKSUM if output&.empty? raise InvalidRepository if status == 128 && output.to_s.downcase =~ /not a git repository/
# Empty repositories returns with a non-zero status and an empty output.
raise ChecksumError, output unless output.blank?
raise ChecksumError, output return EMPTY_REPOSITORY_CHECKSUM
end end
refs = output.split("\n") refs = output.split("\n")
......
...@@ -292,6 +292,8 @@ module Gitlab ...@@ -292,6 +292,8 @@ module Gitlab
request = Gitaly::CalculateChecksumRequest.new(repository: @gitaly_repo) request = Gitaly::CalculateChecksumRequest.new(repository: @gitaly_repo)
response = GitalyClient.call(@storage, :repository_service, :calculate_checksum, request) response = GitalyClient.call(@storage, :repository_service, :calculate_checksum, request)
response.checksum.presence response.checksum.presence
rescue GRPC::DataLoss => e
raise Gitlab::Git::Repository::InvalidRepository.new(e)
end end
def raw_changes_between(from, to) def raw_changes_between(from, to)
......
...@@ -283,7 +283,7 @@ describe ProjectsHelper do ...@@ -283,7 +283,7 @@ describe ProjectsHelper do
end end
it 'removes the repo path' do it 'removes the repo path' do
repo = "#{storage_path}/namespace/test.git" repo = File.join(storage_path, 'namespace/test.git')
import_error = "Could not clone #{repo}\n" import_error = "Could not clone #{repo}\n"
expect(sanitize_repo_path(project, import_error)).to eq('Could not clone [REPOS PATH]/namespace/test.git') expect(sanitize_repo_path(project, import_error)).to eq('Could not clone [REPOS PATH]/namespace/test.git')
......
...@@ -28,6 +28,10 @@ describe('Multi-file editor library model', () => { ...@@ -28,6 +28,10 @@ describe('Multi-file editor library model', () => {
expect(model.originalModel).not.toBeNull(); expect(model.originalModel).not.toBeNull();
expect(model.model).not.toBeNull(); expect(model.model).not.toBeNull();
expect(model.baseModel).not.toBeNull(); expect(model.baseModel).not.toBeNull();
expect(model.originalModel.uri.path).toBe('original/path--path');
expect(model.model.uri.path).toBe('path--path');
expect(model.baseModel.uri.path).toBe('target/path--path');
}); });
it('creates model with head file to compare against', () => { it('creates model with head file to compare against', () => {
......
...@@ -569,6 +569,22 @@ describe('IDE store file actions', () => { ...@@ -569,6 +569,22 @@ describe('IDE store file actions', () => {
.catch(done.fail); .catch(done.fail);
}); });
it('returns false when already opened', done => {
store.state.openFiles.push({
...f,
active: true,
key: `pending-${f.key}`,
});
store
.dispatch('openPendingTab', { file: f, keyPrefix: 'pending' })
.then(added => {
expect(added).toBe(false);
})
.then(done)
.catch(done.fail);
});
it('pushes router URL when added', done => { it('pushes router URL when added', done => {
store.state.currentBranchId = 'master'; store.state.currentBranchId = 'master';
......
...@@ -2275,7 +2275,22 @@ describe Gitlab::Git::Repository, seed_helper: true do ...@@ -2275,7 +2275,22 @@ describe Gitlab::Git::Repository, seed_helper: true do
expect(empty_repo.checksum).to eq '0000000000000000000000000000000000000000' expect(empty_repo.checksum).to eq '0000000000000000000000000000000000000000'
end end
it 'raises a no repository exception when there is no repo' do it 'raises Gitlab::Git::Repository::InvalidRepository error for non-valid git repo' do
FileUtils.rm_rf(File.join(storage_path, 'non-valid.git'))
system(git_env, *%W(#{Gitlab.config.git.bin_path} clone --bare #{TEST_REPO_PATH} non-valid.git),
chdir: SEED_STORAGE_PATH,
out: '/dev/null',
err: '/dev/null')
File.truncate(File.join(storage_path, 'non-valid.git/HEAD'), 0)
non_valid = described_class.new('default', 'non-valid.git', '')
expect { non_valid.checksum }.to raise_error(Gitlab::Git::Repository::InvalidRepository)
end
it 'raises Gitlab::Git::Repository::NoRepository error when there is no repo' do
broken_repo = described_class.new('default', 'a/path.git', '') broken_repo = described_class.new('default', 'a/path.git', '')
expect { broken_repo.checksum }.to raise_error(Gitlab::Git::Repository::NoRepository) expect { broken_repo.checksum }.to raise_error(Gitlab::Git::Repository::NoRepository)
......
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20180420010016_add_pipeline_build_foreign_key.rb')
describe AddPipelineBuildForeignKey, :migration do
let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) }
let(:pipelines) { table(:ci_pipelines) }
let(:builds) { table(:ci_builds) }
before do
namespaces.create(id: 10, name: 'gitlab-org', path: 'gitlab-org')
projects.create!(id: 11, namespace_id: 10, name: 'gitlab', path: 'gitlab')
pipelines.create!(id: 12, project_id: 11, ref: 'master', sha: 'adf43c3a')
builds.create!(id: 101, commit_id: 12, project_id: 11)
builds.create!(id: 102, commit_id: 222, project_id: 11)
builds.create!(id: 103, commit_id: 333, project_id: 11)
builds.create!(id: 104, commit_id: 12, project_id: 11)
builds.create!(id: 106, commit_id: nil, project_id: 11)
builds.create!(id: 107, commit_id: 12, project_id: nil)
end
it 'adds foreign key after removing orphans' do
expect(builds.all.count).to eq 6
expect(foreign_key_exists?(:ci_builds, :ci_pipelines, column: :commit_id)).to be_falsey
migrate!
expect(builds.all.pluck(:id)).to eq [101, 104]
expect(foreign_key_exists?(:ci_builds, :ci_pipelines, column: :commit_id)).to be_truthy
end
end
...@@ -74,9 +74,8 @@ describe Clusters::Applications::Runner do ...@@ -74,9 +74,8 @@ describe Clusters::Applications::Runner do
it 'assigns the new runner to runner' do it 'assigns the new runner to runner' do
subject subject
gitlab_runner.reload
expect(gitlab_runner.runner).not_to be_nil expect(gitlab_runner.reload.runner).to be_project_type
end end
end end
......
...@@ -24,6 +24,16 @@ module MigrationsHelpers ...@@ -24,6 +24,16 @@ module MigrationsHelpers
end end
end end
def foreign_key_exists?(source, target = nil, column: nil)
ActiveRecord::Base.connection.foreign_keys(source).any? do |key|
if column
key.options[:column].to_s == column.to_s
else
key.to_table.to_s == target.to_s
end
end
end
def reset_column_in_all_models def reset_column_in_all_models
clear_schema_cache! clear_schema_cache!
......
...@@ -86,7 +86,7 @@ shared_examples "migrating a deleted user's associated records to the ghost user ...@@ -86,7 +86,7 @@ shared_examples "migrating a deleted user's associated records to the ghost user
end end
it "blocks the user before #{record_class_name} migration begins" do it "blocks the user before #{record_class_name} migration begins" do
expect(service).to receive("migrate_#{record_class_name.parameterize('_')}s".to_sym) do expect(service).to receive("migrate_#{record_class_name.parameterize('_').pluralize}".to_sym) do
expect(user.reload).to be_blocked expect(user.reload).to be_blocked
end end
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
# User-specific stuff # User-specific stuff
.idea/**/workspace.xml .idea/**/workspace.xml
.idea/**/tasks.xml .idea/**/tasks.xml
.idea/dictionaries .idea/**/dictionaries
.idea/**/shelf
# Sensitive or high-churn files # Sensitive or high-churn files
.idea/**/dataSources/ .idea/**/dataSources/
......
...@@ -12,3 +12,5 @@ Session.vim ...@@ -12,3 +12,5 @@ Session.vim
*~ *~
# Auto-generated tag files # Auto-generated tag files
tags tags
# Persistent undo
[._]*.un~
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# Package Files # # Package Files #
*.jar *.jar
*.war *.war
*.nar
*.ear *.ear
*.zip *.zip
*.tar.gz *.tar.gz
......
...@@ -52,7 +52,7 @@ Carthage/Build ...@@ -52,7 +52,7 @@ Carthage/Build
fastlane/report.xml fastlane/report.xml
fastlane/Preview.html fastlane/Preview.html
fastlane/screenshots fastlane/screenshots/**/*.png
fastlane/test_output fastlane/test_output
# Code Injection # Code Injection
......
...@@ -64,5 +64,5 @@ Carthage/Build ...@@ -64,5 +64,5 @@ Carthage/Build
fastlane/report.xml fastlane/report.xml
fastlane/Preview.html fastlane/Preview.html
fastlane/screenshots fastlane/screenshots/**/*.png
fastlane/test_output fastlane/test_output
...@@ -198,6 +198,9 @@ pythontex-files-*/ ...@@ -198,6 +198,9 @@ pythontex-files-*/
# easy-todo # easy-todo
*.lod *.lod
# xmpincl
*.xmpi
# xindy # xindy
*.xdy *.xdy
...@@ -234,3 +237,6 @@ TSWLatexianTemp* ...@@ -234,3 +237,6 @@ TSWLatexianTemp*
# standalone packages # standalone packages
*.sta *.sta
# generated if using elsarticle.cls
*.spl
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
Assets/AssetStoreTools* Assets/AssetStoreTools*
# Visual Studio cache directory # Visual Studio cache directory
/.vs/ .vs/
# Autogenerated VS/MD/Consulo solution and project files # Autogenerated VS/MD/Consulo solution and project files
ExportedObj/ ExportedObj/
...@@ -22,6 +22,7 @@ ExportedObj/ ...@@ -22,6 +22,7 @@ ExportedObj/
*.booproj *.booproj
*.svd *.svd
*.pdb *.pdb
*.opendb
# Unity3D generated meta files # Unity3D generated meta files
*.pidb.meta *.pidb.meta
......
...@@ -240,6 +240,7 @@ Backup*/ ...@@ -240,6 +240,7 @@ Backup*/
UpgradeLog*.XML UpgradeLog*.XML
UpgradeLog*.htm UpgradeLog*.htm
ServiceFabricBackup/ ServiceFabricBackup/
*.rptproj.bak
# SQL Server files # SQL Server files
*.mdf *.mdf
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
image: "chef/chefdk" image: "chef/chefdk"
services: services:
- docker:stable-dind - docker:dind
variables: variables:
DOCKER_HOST: "tcp://docker:2375" DOCKER_HOST: "tcp://docker:2375"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
image: docker:latest image: docker:latest
services: services:
- docker:stable-dind - docker:dind
before_script: before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......
...@@ -24,7 +24,7 @@ variables: ...@@ -24,7 +24,7 @@ variables:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true" MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Cache downloaded dependencies and plugins between builds. # Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"' # To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache: cache:
paths: paths:
- .m2/repository - .m2/repository
......
# Lifted from: https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/ # Lifted from: https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
# This file assumes an own GitLab CI runner, setup on an OS X system. # This file assumes an own GitLab CI runner, setup on an macOS system.
stages: stages:
- build - build
- archive - archive
...@@ -8,11 +8,11 @@ build_project: ...@@ -8,11 +8,11 @@ build_project:
stage: build stage: build
script: script:
- xcodebuild clean -project ProjectName.xcodeproj -scheme SchemeName | xcpretty - xcodebuild clean -project ProjectName.xcodeproj -scheme SchemeName | xcpretty
- xcodebuild test -project ProjectName.xcodeproj -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.2' | xcpretty -s - xcodebuild test -project ProjectName.xcodeproj -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.3' | xcpretty -s
tags: tags:
- ios_9-2 - ios_11-3
- xcode_7-2 - xcode_9-3
- osx_10-11 - macos_10-13
archive_project: archive_project:
stage: archive stage: archive
...@@ -25,6 +25,6 @@ archive_project: ...@@ -25,6 +25,6 @@ archive_project:
paths: paths:
- build/ProjectName.ipa - build/ProjectName.ipa
tags: tags:
- ios_9-2 - ios_11-3
- xcode_7-2 - xcode_9-3
- osx_10-11 - macos_10-13
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment