Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Docker
cypress
Commits
2f8bfabf
Commit
2f8bfabf
authored
Mar 04, 2020
by
Manuel Christlieb
Browse files
create team23/cypress image
parents
Pipeline
#35322
passed with stage
in 50 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
2f8bfabf
image
:
docker:latest
services
:
-
name
:
docker:dind
stages
:
-
build
build10
:
stage
:
build
only
:
refs
:
-
master
script
:
-
/bin/sh build.sh
10
10/Dockerfile
0 → 100644
View file @
2f8bfabf
FROM
cypress/browsers:node10.16.0-chrome77
README.md
0 → 100644
View file @
2f8bfabf
# Supported tags and respective Dockerfile links
*
`10`
:
[
Dockerfile
](
10/Dockerfile
)
build.sh
0 → 100755
View file @
2f8bfabf
#!/bin/bash
VERSION
=
"
${
1
:-}
"
ADDITIONAL
=
"
${
2
:-}
"
if
[
-z
"
$VERSION
"
]
then
echo
"Error: No version supplied"
echo
"Usage:
$0
<version> [additional]"
exit
1
fi
set
-o
errexit
set
-o
pipefail
if
[
-z
"
$CI_REGISTRY
"
]
then
# outside gitlab ci runner
docker login docker.team23.de
BUILD_PROJECT_NAME
=
$(
basename
$(
pwd
)
)
BUILD_IMAGE_BASE
=
"docker.team23.de/docker/
$BUILD_PROJECT_NAME
"
else
# inside gitlab ci runner
docker login
-u
gitlab-ci-token
-p
"
$CI_JOB_TOKEN
"
"
$CI_REGISTRY
"
BUILD_IMAGE_BASE
=
"
$CI_REGISTRY
/
$CI_PROJECT_PATH
"
fi
# Build Image
docker build
--pull
-t
"
$BUILD_IMAGE_BASE
:
$VERSION
"
"
$VERSION
"
# only CI should be allowed push images
[
-n
"
$CI_REGISTRY
"
]
&&
docker push
"
$BUILD_IMAGE_BASE
:
$VERSION
"
if
[
!
-z
"
$ADDITIONAL
"
]
then
# Build additional image (usually latest)
docker build
--pull
-t
"
$BUILD_IMAGE_BASE
:
$ADDITIONAL
"
"
$VERSION
"
[
-n
"
$CI_REGISTRY
"
]
&&
docker push
"
$BUILD_IMAGE_BASE
:
$ADDITIONAL
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment