Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
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
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
Johannes Zellner
Castopod
Commits
029804b9
Commit
029804b9
authored
2 years ago
by
Romain de Laage
Committed by
Yassine Doghri
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
build(docker): add build for tagged versions on main, beta and alpha
parent
c4a07c29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+7
-0
7 additions, 0 deletions
.gitlab-ci.yml
docker/production/.gitlab-ci.yml
+35
-0
35 additions, 0 deletions
docker/production/.gitlab-ci.yml
scripts/bundle.sh
+3
-0
3 additions, 0 deletions
scripts/bundle.sh
with
45 additions
and
0 deletions
.gitlab-ci.yml
+
7
−
0
View file @
029804b9
...
...
@@ -131,6 +131,10 @@ release:
dependencies
:
-
php-dependencies
-
js-dependencies
artifacts
:
paths
:
-
castopod
-
CP_VERSION.env
only
:
-
main
-
beta
...
...
@@ -163,5 +167,8 @@ docker:
only
:
refs
:
-
develop
-
main
-
beta
-
alpha
variables
:
-
$CI_PROJECT_NAMESPACE == "adaures"
This diff is collapsed.
Click to expand it.
docker/production/.gitlab-ci.yml
+
35
−
0
View file @
029804b9
...
...
@@ -18,3 +18,38 @@ docker-build-rolling:
only
:
refs
:
-
develop
docker-build-main-release
:
stage
:
build
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
cp ${DOCKER_HUB_CONFIG} /kaniko/.docker/config.json
-
export CP_VERSION=(cat CP_VERSION.env)
-
/kaniko/executor --context . --dockerfile docker/production/web-server/Dockerfile --destination ${DOCKER_IMAGE_WEB_SERVER}:${CP_VERSION} --destination ${DOCKER_IMAGE_WEB_SERVER}:latest
-
/kaniko/executor --context . --dockerfile docker/production/app/Dockerfile --destination ${DOCKER_IMAGE_APP}:${CP_VERSION} --destination ${DOCKER_IMAGE_APP}:latest
needs
:
-
pipeline
:
$PARENT_PIPELINE_ID
job
:
release
only
:
refs
:
-
main
docker-build-alpha-beta-release
:
stage
:
build
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
cp ${DOCKER_HUB_CONFIG} /kaniko/.docker/config.json
-
export CP_VERSION=(cat CP_VERSION.env)
-
/kaniko/executor --context . --dockerfile docker/production/web-server/Dockerfile --destination ${DOCKER_IMAGE_WEB_SERVER}:${CP_VERSION}
-
/kaniko/executor --context . --dockerfile docker/production/app/Dockerfile --destination ${DOCKER_IMAGE_APP}:${CP_VERSION}
needs
:
-
pipeline
:
$PARENT_PIPELINE_ID
job
:
release
only
:
refs
:
-
alpha
-
beta
This diff is collapsed.
Click to expand it.
scripts/bundle.sh
+
3
−
0
View file @
029804b9
...
...
@@ -11,6 +11,9 @@ echo "$( jq '.version = "'$COMPOSER_VERSION'"' composer.json )" > composer.json
# replace CP_VERSION constant in app/config/constants
sed
-i
"s/^defined('CP_VERSION').*/defined('CP_VERSION') || define('CP_VERSION', '
$VERSION
');/"
./app/Config/Constants.php
# fill CP_VERSION.env for docker build
echo
"
$VERSION
"
>
./CP_VERSION.env
# install wget to download archives
apt-get
install
wget
...
...
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