diff options
Diffstat (limited to 'qa/qa/fixtures/package_managers')
28 files changed, 450 insertions, 0 deletions
diff --git a/qa/qa/fixtures/package_managers/composer/composer.json.erb b/qa/qa/fixtures/package_managers/composer/composer.json.erb new file mode 100644 index 00000000000..a1e31e2599f --- /dev/null +++ b/qa/qa/fixtures/package_managers/composer/composer.json.erb @@ -0,0 +1,13 @@ +{ + "name": "<%= project.path_with_namespace %>/<%= package.name %>", + "description": "Library XY", + "type": "library", + "license": "GPL-3.0-only", + "authors": [ + { + "name": "John Doe", + "email": "john@example.com" + } + ], + "require": {} +}
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/composer/composer_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/composer/composer_upload_package.yaml.erb new file mode 100644 index 00000000000..b6bcfafffee --- /dev/null +++ b/qa/qa/fixtures/package_managers/composer/composer_upload_package.yaml.erb @@ -0,0 +1,13 @@ +publish: + image: curlimages/curl:latest + stage: build + variables: + URL: "$CI_SERVER_PROTOCOL://$CI_SERVER_HOST:$CI_SERVER_PORT/api/v4/projects/$CI_PROJECT_ID/packages/composer?job_token=$CI_JOB_TOKEN" + script: + - version=$([[ -z "$CI_COMMIT_TAG" ]] && echo "branch=$CI_COMMIT_REF_NAME" || echo "tag=$CI_COMMIT_TAG") + - insecure=$([ "$CI_SERVER_PROTOCOL" = "http" ] && echo "--insecure" || echo "") + - response=$(curl -s -w "%{http_code}" $insecure --data $version $URL) + - code=$(echo "$response" | tail -n 1) + - body=$(echo "$response" | head -n 1) + tags: + - "runner-for-<%= project.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/conan/conan_upload_install_package.yaml.erb b/qa/qa/fixtures/package_managers/conan/conan_upload_install_package.yaml.erb new file mode 100644 index 00000000000..39c04f6511b --- /dev/null +++ b/qa/qa/fixtures/package_managers/conan/conan_upload_install_package.yaml.erb @@ -0,0 +1,12 @@ +image: conanio/gcc7 + +test_package: + stage: deploy + script: + - conan remote add gitlab <%= gitlab_address_with_port %>/api/v4/projects/<%= project.id %>/packages/conan + - conan new <%= package.name %>/0.1 -t + - conan create . mycompany/stable + - "CONAN_LOGIN_USERNAME=ci_user CONAN_PASSWORD=${CI_JOB_TOKEN} conan upload <%= package.name %>/0.1@mycompany/stable --all --remote=gitlab" + - conan install <%= package.name %>/0.1@mycompany/stable --remote=gitlab + tags: + - runner-for-<%= project.name %>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/generic/generic_upload_install_package.yaml.erb b/qa/qa/fixtures/package_managers/generic/generic_upload_install_package.yaml.erb new file mode 100644 index 00000000000..13fe3e2c62e --- /dev/null +++ b/qa/qa/fixtures/package_managers/generic/generic_upload_install_package.yaml.erb @@ -0,0 +1,18 @@ +image: curlimages/curl:latest + +stages: + - upload + - download + +upload: + stage: upload + script: + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file file.txt ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/<%= package.name %>/0.0.1/file.txt' + tags: + - runner-for-<%= project.name %> +download: + stage: download + script: + - 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/<%= package.name %>/0.0.1/file.txt -O file_downloaded.txt' + tags: + - runner-for-<%= project.name %>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/helm/Chart.yaml.erb b/qa/qa/fixtures/package_managers/helm/Chart.yaml.erb new file mode 100644 index 00000000000..5a56533c65d --- /dev/null +++ b/qa/qa/fixtures/package_managers/helm/Chart.yaml.erb @@ -0,0 +1,6 @@ +apiVersion: v2 +name: <%= package_name %> +description: GitLab QA helm package +type: application +version: <%= package_version %> +appVersion: "1.16.0"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/helm/helm_install_package.yaml.erb b/qa/qa/fixtures/package_managers/helm/helm_install_package.yaml.erb new file mode 100644 index 00000000000..786b0592153 --- /dev/null +++ b/qa/qa/fixtures/package_managers/helm/helm_install_package.yaml.erb @@ -0,0 +1,11 @@ +pull: + image: alpine:3 + script: + - apk add helm --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing + - helm repo add --username <%= username %> --password <%= access_token %> gitlab_qa ${CI_API_V4_URL}/projects/<%= package_project.id %>/packages/helm/stable + - helm repo update + - helm pull gitlab_qa/<%= package_name %> + only: + - <%= client_project.default_branch %> + tags: + - runner-for-<%=client_project.group.name %>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/helm/helm_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/helm/helm_upload_package.yaml.erb new file mode 100644 index 00000000000..b3e907b50f4 --- /dev/null +++ b/qa/qa/fixtures/package_managers/helm/helm_upload_package.yaml.erb @@ -0,0 +1,14 @@ +deploy: + image: alpine:3 + script: + - apk add helm --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing + - apk add curl + - helm create <%= package_name %> + - cp ./Chart.yaml <%= package_name %> + - helm package <%= package_name %> + - http_code=$(curl --write-out "%{http_code}" --request POST --form 'chart=@<%= package_name %>-<%= package_version %>.tgz' --user <%= username %>:<%= access_token %> ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts --output /dev/null --silent) + - '[ $http_code = "201" ]' + only: + - <%= package_project.default_branch %> + tags: + - runner-for-<%= package_project.group.name %>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/build_install.gradle.erb b/qa/qa/fixtures/package_managers/maven/build_install.gradle.erb new file mode 100644 index 00000000000..303a64ad233 --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/build_install.gradle.erb @@ -0,0 +1,28 @@ +plugins { + id 'java' + id 'application' +} + +repositories { + jcenter() + maven { + url "<%= gitlab_address_with_port %>/api/v4/projects/<%= package_project.id %>/packages/maven" + name "GitLab" + credentials(HttpHeaderCredentials) { + name = '<%= maven_header_name %>' + value = <%= token %> + } + authentication { + header(HttpHeaderAuthentication) + } + } +} + +dependencies { + implementation group: '<%= group_id %>', name: '<%= artifact_id %>', version: '<%= package_version %>' + testImplementation 'junit:junit:4.12' +} + +application { + mainClassName = 'gradle_maven_app.App' +}
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/build_upload.gradle.erb b/qa/qa/fixtures/package_managers/maven/build_upload.gradle.erb new file mode 100644 index 00000000000..c14e63e11df --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/build_upload.gradle.erb @@ -0,0 +1,27 @@ +plugins { + id 'java' + id 'maven-publish' +} + +publishing { + publications { + library(MavenPublication) { + groupId '<%= group_id %>' + artifactId '<%= artifact_id %>' + version '<%= package_version %>' + from components.java + } + } + repositories { + maven { + url "<%= gitlab_address_with_port %>/api/v4/projects/<%= package_project.id %>/packages/maven" + credentials(HttpHeaderCredentials) { + name = "Private-Token" + value = "<%= personal_access_token %>" + } + authentication { + header(HttpHeaderAuthentication) + } + } + } +}
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/client_pom.xml.erb b/qa/qa/fixtures/package_managers/maven/client_pom.xml.erb new file mode 100644 index 00000000000..20bb5f3964e --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/client_pom.xml.erb @@ -0,0 +1,19 @@ +<project> + <groupId><%= group_id %></groupId> + <artifactId>maven_client</artifactId> + <version>1.0</version> + <modelVersion>4.0.0</modelVersion> + <repositories> + <repository> + <id><%= package_project.name %></id> + <url><%= gitlab_address_with_port %>/api/v4/groups/<%= package_project.group.id %>/-/packages/maven</url> + </repository> + </repositories> + <dependencies> + <dependency> + <groupId><%= group_id %></groupId> + <artifactId><%= artifact_id %></artifactId> + <version><%= package_version %></version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/gradle_install_package.yaml.erb b/qa/qa/fixtures/package_managers/maven/gradle_install_package.yaml.erb new file mode 100644 index 00000000000..49873f124cc --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/gradle_install_package.yaml.erb @@ -0,0 +1,8 @@ + build: + image: gradle:6.5-jdk11 + script: + - 'gradle build' + only: + - "<%= client_project.default_branch %>" + tags: + - "runner-for-<%= client_project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/gradle_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/maven/gradle_upload_package.yaml.erb new file mode 100644 index 00000000000..3f3c7dce03c --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/gradle_upload_package.yaml.erb @@ -0,0 +1,8 @@ +deploy: + image: gradle:6.5-jdk11 + script: + - 'gradle publish' + only: + - "<%= package_project.default_branch %>" + tags: + - "runner-for-<%= package_project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/maven_install_package.yaml.erb b/qa/qa/fixtures/package_managers/maven/maven_install_package.yaml.erb new file mode 100644 index 00000000000..78d6255e9a9 --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/maven_install_package.yaml.erb @@ -0,0 +1,8 @@ +install: + image: maven:3.6-jdk-11 + script: + - "mvn install -s settings.xml" + only: + - "<%= client_project.default_branch %>" + tags: + - "runner-for-<%= client_project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/maven_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/maven/maven_upload_package.yaml.erb new file mode 100644 index 00000000000..64a63bf0bd8 --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/maven_upload_package.yaml.erb @@ -0,0 +1,8 @@ + deploy: + image: maven:3.6-jdk-11 + script: + - 'mvn deploy -s settings.xml' + only: + - "<%= package_project.default_branch %>" + tags: + - "runner-for-<%= package_project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/package_pom.xml.erb b/qa/qa/fixtures/package_managers/maven/package_pom.xml.erb new file mode 100644 index 00000000000..5159172a170 --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/package_pom.xml.erb @@ -0,0 +1,22 @@ + <project> + <groupId><%= group_id %></groupId> + <artifactId><%= artifact_id %></artifactId> + <version><%= package_version %></version> + <modelVersion>4.0.0</modelVersion> + <repositories> + <repository> + <id><%= package_project.name %></id> + <url><%= gitlab_address_with_port %>/api/v4/groups/<%= package_project.group.id %>/-/packages/maven</url> + </repository> + </repositories> + <distributionManagement> + <repository> + <id><%= package_project.name %></id> + <url><%= gitlab_address_with_port %>/api/v4/projects/<%= package_project.id %>/packages/maven</url> + </repository> + <snapshotRepository> + <id><%= package_project.name %></id> + <url><%= gitlab_address_with_port %>/api/v4/projects/<%= package_project.id %>/packages/maven</url> + </snapshotRepository> + </distributionManagement> +</project>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/settings.xml.erb b/qa/qa/fixtures/package_managers/maven/settings.xml.erb new file mode 100644 index 00000000000..b670b83cf85 --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/settings.xml.erb @@ -0,0 +1,16 @@ +<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> +<servers> + <server> + <id><%= package_project.name %></id> + <configuration> + <httpHeaders> + <property> + <name><%= maven_header_name %></name> + <value><%= token %></value> + </property> + </httpHeaders> + </configuration> + </server> +</servers> +</settings>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/maven/settings_with_pat.xml.erb b/qa/qa/fixtures/package_managers/maven/settings_with_pat.xml.erb new file mode 100644 index 00000000000..611c232819f --- /dev/null +++ b/qa/qa/fixtures/package_managers/maven/settings_with_pat.xml.erb @@ -0,0 +1,16 @@ +<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> + <servers> + <server> + <id><%= package_project.name %></id> + <configuration> + <httpHeaders> + <property> + <name>Private-Token</name> + <value><%= personal_access_token %></value> + </property> + </httpHeaders> + </configuration> + </server> + </servers> +</settings>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/npm/npm_install_package_instance.yaml.erb b/qa/qa/fixtures/package_managers/npm/npm_install_package_instance.yaml.erb new file mode 100644 index 00000000000..a396fc98e95 --- /dev/null +++ b/qa/qa/fixtures/package_managers/npm/npm_install_package_instance.yaml.erb @@ -0,0 +1,21 @@ +image: node:latest + +stages: + - install + +install: + stage: install + script: + - "npm config set @<%= registry_scope %>:registry <%= gitlab_address_with_port %>/api/v4/packages/npm/" + - "npm install <%= package.name %>" + cache: + key: ${CI_BUILD_REF_NAME} + paths: + - node_modules/ + artifacts: + paths: + - node_modules/ + only: + - "<%= another_project.default_branch %>" + tags: + - "runner-for-<%= another_project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/npm/npm_upload_install_package_project.yaml.erb b/qa/qa/fixtures/package_managers/npm/npm_upload_install_package_project.yaml.erb new file mode 100644 index 00000000000..8d94d03ef9b --- /dev/null +++ b/qa/qa/fixtures/package_managers/npm/npm_upload_install_package_project.yaml.erb @@ -0,0 +1,31 @@ +image: node:latest + +stages: + - deploy + - install + +deploy: + stage: deploy + script: + - echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=<%= auth_token %>">.npmrc + - npm publish + only: + - "<%= project.default_branch %>" + tags: + - "runner-for-<%= project.name %>" +install: + stage: install + script: + - "npm config set @<%= registry_scope %>:registry <%= gitlab_address_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" + - "npm install <%= package.name %>" + cache: + key: ${CI_BUILD_REF_NAME} + paths: + - node_modules/ + artifacts: + paths: + - node_modules/ + only: + - "<%= project.default_branch %>" + tags: + - "runner-for-<%= project.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/npm/npm_upload_package_instance.yaml.erb b/qa/qa/fixtures/package_managers/npm/npm_upload_package_instance.yaml.erb new file mode 100644 index 00000000000..13c00cd17c4 --- /dev/null +++ b/qa/qa/fixtures/package_managers/npm/npm_upload_package_instance.yaml.erb @@ -0,0 +1,14 @@ +image: node:latest + +stages: + - deploy + +deploy: + stage: deploy + script: + - echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=<%= auth_token %>">.npmrc + - npm publish + only: + - "<%= project.default_branch %>" + tags: + - "runner-for-<%= project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/npm/package_instance.json.erb b/qa/qa/fixtures/package_managers/npm/package_instance.json.erb new file mode 100644 index 00000000000..46fecf97e2c --- /dev/null +++ b/qa/qa/fixtures/package_managers/npm/package_instance.json.erb @@ -0,0 +1,8 @@ +{ + "name": "<%= package.name %>", + "version": "1.0.0", + "description": "Example package for GitLab npm registry", + "publishConfig": { + "@<%= registry_scope %>:registry": "<%= gitlab_address_with_port %>/api/v4/projects/<%= project.id %>/packages/npm/" + } +}
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/npm/package_project.json.erb b/qa/qa/fixtures/package_managers/npm/package_project.json.erb new file mode 100644 index 00000000000..46fecf97e2c --- /dev/null +++ b/qa/qa/fixtures/package_managers/npm/package_project.json.erb @@ -0,0 +1,8 @@ +{ + "name": "<%= package.name %>", + "version": "1.0.0", + "description": "Example package for GitLab npm registry", + "publishConfig": { + "@<%= registry_scope %>:registry": "<%= gitlab_address_with_port %>/api/v4/projects/<%= project.id %>/packages/npm/" + } +}
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/nuget/nuget_install_package.yaml.erb b/qa/qa/fixtures/package_managers/nuget/nuget_install_package.yaml.erb new file mode 100644 index 00000000000..39b65a55884 --- /dev/null +++ b/qa/qa/fixtures/package_managers/nuget/nuget_install_package.yaml.erb @@ -0,0 +1,15 @@ +image: mcr.microsoft.com/dotnet/sdk:5.0 + +stages: + - install + +install: + stage: install + script: + - dotnet nuget locals all --clear + - dotnet nuget add source "$CI_SERVER_URL/api/v4/groups/<%= another_project.group.id %>/-/packages/nuget/index.json" --name gitlab --username <%= auth_token_username %> --password <%= auth_token_password %> --store-password-in-clear-text + - "dotnet add otherdotnet.csproj package <%= package.name %> --version 1.0.0" + only: + - "<%= another_project.default_branch %>" + tags: + - "runner-for-<%= project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/nuget/nuget_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/nuget/nuget_upload_package.yaml.erb new file mode 100644 index 00000000000..7c88eb49be0 --- /dev/null +++ b/qa/qa/fixtures/package_managers/nuget/nuget_upload_package.yaml.erb @@ -0,0 +1,17 @@ +image: mcr.microsoft.com/dotnet/sdk:5.0 + +stages: + - deploy + +deploy: + stage: deploy + script: + - dotnet restore -p:Configuration=Release + - dotnet build -c Release + - dotnet pack -c Release -p:PackageID=<%= package.name %> + - dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username <%= auth_token_username %> --password <%= auth_token_password %> --store-password-in-clear-text + - dotnet nuget push "bin/Release/*.nupkg" --source gitlab + rules: + - if: '$CI_COMMIT_BRANCH == "<%= project.default_branch %>"' + tags: + - "runner-for-<%= project.group.name %>"
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb b/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb new file mode 100644 index 00000000000..3ea71152801 --- /dev/null +++ b/qa/qa/fixtures/package_managers/pypi/pypi_upload_install_package.yaml.erb @@ -0,0 +1,19 @@ +image: python:latest +stages: + - run + - install + +run: + stage: run + script: + - pip install twine + - python setup.py sdist bdist_wheel + - "TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url <%= gitlab_address_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*" + tags: + - runner-for-<%= project.name %> +install: + stage: install + script: + - "pip install <%= package.name %> --no-deps --index-url <%= uri.scheme %>://<%= personal_access_token %>:<%= personal_access_token %>@<%= gitlab_host_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --trusted-host <%= gitlab_host_with_port %>" + tags: + - runner-for-<%= project.name %>
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/pypi/setup.py.erb b/qa/qa/fixtures/package_managers/pypi/setup.py.erb new file mode 100644 index 00000000000..d365f93cb5e --- /dev/null +++ b/qa/qa/fixtures/package_managers/pypi/setup.py.erb @@ -0,0 +1,16 @@ +import setuptools + +setuptools.setup( + name="<%= package.name %>", + version="0.0.1", + author="Example Author", + author_email="author@example.com", + description="A small example package", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires='>=3.6', +)
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/rubygems/package.gemspec.erb b/qa/qa/fixtures/package_managers/rubygems/package.gemspec.erb new file mode 100644 index 00000000000..915deb0335d --- /dev/null +++ b/qa/qa/fixtures/package_managers/rubygems/package.gemspec.erb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +Gem::Specification.new do |s| + s.name = '<%= package.name %>' + s.authors = ['Tanuki Steve', 'Hal 9000'] + s.author = 'Tanuki Steve' + s.version = '0.0.1' + s.date = '2011-09-29' + s.summary = 'this is a test package' + s.files = ['lib/hello_gem.rb'] + s.require_paths = ['lib'] + + s.description = 'A test package for GitLab.' + s.email = 'tanuki@not_real.com' + s.homepage = 'https://gitlab.com/ruby-co/my-package' + s.license = 'MIT' + + s.metadata = { + 'bug_tracker_uri' => 'https://gitlab.com/ruby-co/my-package/issues', + 'changelog_uri' => 'https://gitlab.com/ruby-co/my-package/CHANGELOG.md', + 'documentation_uri' => 'https://gitlab.com/ruby-co/my-package/docs', + 'mailing_list_uri' => 'https://gitlab.com/ruby-co/my-package/mailme', + 'source_code_uri' => 'https://gitlab.com/ruby-co/my-package' + } + + s.bindir = 'bin' + s.platform = Gem::Platform::RUBY + s.post_install_message = 'Installed, thank you!' + s.rdoc_options = ['--main'] + s.required_ruby_version = '>= 2.7.0' + s.required_rubygems_version = '>= 1.8.11' + s.requirements = 'A high powered server or calculator' + s.rubygems_version = '1.8.09' + + s.add_dependency 'dependency_1', '~> 1.2.3' + s.add_dependency 'dependency_2', '3.0.0' + s.add_dependency 'dependency_3', '>= 1.0.0' + s.add_dependency 'dependency_4' +end
\ No newline at end of file diff --git a/qa/qa/fixtures/package_managers/rubygems/rubygems_upload_package.yaml.erb b/qa/qa/fixtures/package_managers/rubygems/rubygems_upload_package.yaml.erb new file mode 100644 index 00000000000..29038130f1b --- /dev/null +++ b/qa/qa/fixtures/package_managers/rubygems/rubygems_upload_package.yaml.erb @@ -0,0 +1,15 @@ +image: ruby + +test_package: + stage: deploy + before_script: + - mkdir ~/.gem + - echo "---" > ~/.gem/credentials + - | + echo "<%= gitlab_address_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems: '${CI_JOB_TOKEN}'" >> ~/.gem/credentials + - chmod 0600 ~/.gem/credentials + script: + - gem build <%= package.name %> + - gem push <%= package.name %>-0.0.1.gem --host <%= gitlab_address_with_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/rubygems + tags: + - runner-for-<%= project.name %>
\ No newline at end of file |