Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Submission API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIT-Connect
Submission API
Commits
cec8562f
Commit
cec8562f
authored
3 years ago
by
David Schwarzmann
Browse files
Options
Downloads
Patches
Plain Diff
extend ci to build a spec and release on tags
parent
149fb0ee
No related branches found
No related tags found
1 merge request
!18
Umbenennung von Antragsformular / Dokument in Anhang
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+50
-1
50 additions, 1 deletion
.gitlab-ci.yml
with
50 additions
and
1 deletion
.gitlab-ci.yml
+
50
−
1
View file @
cec8562f
stages
:
-
lint
-
build
# - upload
-
release
lint-job
:
stage
:
lint
...
...
@@ -8,4 +11,50 @@ lint-job:
name
:
stoplight/spectral:latest
entrypoint
:
[
"
"
]
script
:
-
spectral lint reference/*.yml reference/*.json
\ No newline at end of file
-
spectral lint spec/*.yml
build
:
stage
:
build
image
:
node:current-alpine
before_script
:
-
npm install -g @apidevtools/swagger-cli
-
mkdir dist
script
:
swagger-cli bundle -t yaml -o dist/combined.yml spec/combined.yml' \;
# find ./spec -type f -name "*.yml" -exec sh -c 'swagger-cli bundle -t yaml -o dist/$(basename {}) {}' \;
artifacts
:
expose_as
:
'
Built
API
spec'
paths
:
-
dist/
# upload:
# stage: upload
# image: curlimages/curl:latest
# only:
# refs:
# - master
# - tags
# except:
# - $CI_COMMIT_TAG
# script: >
# curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file dist/*.yml ${PACKAGE_REGISTRY_URL}
release-new-api-version
:
stage
:
release
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
needs
:
-
job
:
build
artifacts
:
true
only
:
refs
:
-
master
-
tags
variables
:
-
$CI_COMMIT_TAG
script
:
-
release-cli -v
-
echo "Releasing new API version"
-
release-cli create --name "v$CI_COMMIT_TAG" --description './CHANGELOG.md'
--tag-name $CI_COMMIT_TAG
# --assets-link '{"name":"matrixregistration-$CI_COMMIT_TAG","url":"https://git.fitko.de/fit-connect/FIT-Connect-PoC/-/jobs/artifacts/$CI_COMMIT_TAG/download?job=build"}'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment