Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mark-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
cylab
mark-web
Commits
05efb997
Commit
05efb997
authored
3 years ago
by
a.croix
Browse files
Options
Downloads
Patches
Plain Diff
Change .gitlab-ci file and remove deploy step (used only for test)
parent
f100b3ac
No related branches found
No related tags found
No related merge requests found
Pipeline
#6442
passed
3 years ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-36
5 additions, 36 deletions
.gitlab-ci.yml
.gitlab-ci.yml.bak
+36
-5
36 additions, 5 deletions
.gitlab-ci.yml.bak
with
41 additions
and
41 deletions
.gitlab-ci.yml
+
5
−
36
View file @
05efb997
stages
:
-
test
-
build
-
deploy
## Cache composer packages between all jobs and all branches
## of this project...
...
...
@@ -13,24 +12,24 @@ cache:
before_script
:
-
cp env.gitlab-ci .env
-
touch storage/app/db.sqlite
-
COMPOSER_CACHE_DIR=composer-cache composer install
--ignore-platform-reqs
-
COMPOSER_CACHE_DIR=composer-cache composer install
-
php artisan key:generate
-
php artisan migrate
# Test with PHP7.4
test:php74
:
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
cylab/php74
:latest
image
:
cylab/php74
stage
:
test
script
:
#- vendor/bin/phpunit --coverage-text --colors=never --coverage-html build/coverage
-
vendor/bin/phpcs
artifacts
:
paths
:
-
build/
-
build/
expire_in
:
1 month
build
:
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
docker:19.03.1
image
:
docker:19.03.1
stage
:
build
tags
:
-
dind
...
...
@@ -43,29 +42,11 @@ build:
script
:
-
docker build -t cylab/ctf .
build:release
:
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:19.03.1
stage
:
build
tags
:
-
dind
services
:
-
docker:19.03.1-dind
variables
:
DOCKER_TLS_CERTDIR
:
"
/certs"
IMAGE_TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script
:
-
docker info
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -t gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG .
-
docker tag gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG gitlab.cylab.be:8081/cylab/mark-web:latest
-
docker push gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG
-
docker push gitlab.cylab.be:8081/cylab/mark-web:latest
build:tagged
:
only
:
-
tags
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
docker:19.03.1
image
:
docker:19.03.1
stage
:
build
tags
:
-
dind
...
...
@@ -81,15 +62,3 @@ build:tagged:
-
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
-
docker push cylab/mark-web:$CI_COMMIT_TAG
-
docker push cylab/mark-web:latest
deploy
:
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/cylab/php74
stage
:
deploy
script
:
# import ssh private key
-
eval $(ssh-agent -s)
-
ssh-add <(echo "$SSH_PRIVATE_KEY")
-
mkdir -p ~/.ssh
-
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# in cylab/php72, envoy is already installed...
-
~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA"
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml.bak
+
36
−
5
View file @
05efb997
stages:
- test
- build
- deploy
## Cache composer packages between all jobs and all branches
## of this project...
...
...
@@ -12,24 +13,24 @@ cache:
before_script:
- cp env.gitlab-ci .env
- touch storage/app/db.sqlite
- COMPOSER_CACHE_DIR=composer-cache composer install
- COMPOSER_CACHE_DIR=composer-cache composer install
--ignore-platform-reqs
- php artisan key:generate
- php artisan migrate
# Test with PHP7.4
test:php74:
image: cylab/php74
image:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
cylab/php74
:latest
stage: test
script:
#- vendor/bin/phpunit --coverage-text --colors=never --coverage-html build/coverage
- vendor/bin/phpcs
artifacts:
paths:
- build/
- build/
expire_in: 1 month
build:
image: docker:19.03.1
image:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
docker:19.03.1
stage: build
tags:
- dind
...
...
@@ -42,11 +43,29 @@ build:
script:
- docker build -t cylab/ctf .
build:release:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:19.03.1
stage: build
tags:
- dind
services:
- docker:19.03.1-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
before_script:
- docker info
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG .
- docker tag gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG gitlab.cylab.be:8081/cylab/mark-web:latest
- docker push gitlab.cylab.be:8081/cylab/mark-web:$CI_COMMIT_REF_SLUG
- docker push gitlab.cylab.be:8081/cylab/mark-web:latest
build:tagged:
only:
- tags
image: docker:19.03.1
image:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/
docker:19.03.1
stage: build
tags:
- dind
...
...
@@ -62,3 +81,15 @@ build:tagged:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker push cylab/mark-web:$CI_COMMIT_TAG
- docker push cylab/mark-web:latest
deploy:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/cylab/php74
stage: deploy
script:
# import ssh private key
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# in cylab/php72, envoy is already installed...
- ~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA"
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