Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
Website
Commits
a411ef68
Commit
a411ef68
authored
3 years ago
by
jonasled
Browse files
Options
Downloads
Patches
Plain Diff
update docker build and add php scheker for php
parent
12f437ec
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!2
New ci script
Pipeline
#1025
failed
3 years ago
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-7
26 additions, 7 deletions
.gitlab-ci.yml
with
26 additions
and
7 deletions
.gitlab-ci.yml
+
26
−
7
View file @
a411ef68
...
@@ -4,16 +4,35 @@ cache:
...
@@ -4,16 +4,35 @@ cache:
-
node_modules/
-
node_modules/
-
public/API/vendor/
-
public/API/vendor/
docker-build
-master
:
docker-build
:
#
O
fficial docker image.
#
Use the o
fficial docker image.
image
:
docker:latest
image
:
docker:latest
stage
:
build
stage
:
build
services
:
services
:
-
docker:dind
-
docker:dind
before_script
:
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" gitlab.jonasled.de
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# Default branch leaves tag empty (= latest tag)
# All other branches are tagged with the escaped branch name (commit ref slug)
script
:
script
:
-
docker build -t gitlab.jonasled.de/jonasled/website:latest .
-
|
-
docker push "gitlab.jonasled.de/jonasled/website:latest"
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
only
:
tag=""
-
master
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
\ No newline at end of file
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
-
docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
-
docker push "$CI_REGISTRY_IMAGE${tag}"
# Run this job in a branch where a Dockerfile exists
rules
:
-
if
:
$CI_COMMIT_BRANCH
exists
:
-
Dockerfile
php-security-checker
:
stage
:
linting
image
:
registry.gitlab.com/pipeline-components/php-security-checker:latest
script
:
-
cd public/API && security-checker security:check composer.lock
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