Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
safelinks-cleaner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
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
safelinks
safelinks-cleaner
Commits
f05b27ac
Commit
f05b27ac
authored
4 years ago
by
David Byers
Browse files
Options
Downloads
Patches
Plain Diff
More CI/CD.
parent
3db05e10
No related branches found
No related tags found
1 merge request
!8
Beta
Pipeline
#33326
passed
4 years ago
Stage: prepare
Stage: collect
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+52
-37
52 additions, 37 deletions
.gitlab-ci.yml
with
52 additions
and
37 deletions
.gitlab-ci.yml
+
52
−
37
View file @
f05b27ac
---
stages
:
-
version
-
prepare
-
build
-
collect
-
deploy
version
:
image
:
python:3.7-stretch
stage
:
version
script
:
-
python3 scripts/update-version.py -k "$SSH_TAGGING_KEY" -o version -v
artifacts
:
paths
:
-
version
only
:
-
branches
# Anchors
.release_rules
:
&release_rules
rules
:
-
if
:
"
$CI_COMMIT_TAG
=~
/^release-/
&&
$CI_COMMIT_BRANCH
==
'master'"
when
:
always
-
when
:
never
prepare
:
# Stage: prepare
#
# Builds unpacked extensions from the source files.
.prepare
:
stage
:
prepare
image
:
python:3.7-stretch
script
:
-
python3 scripts/update-version.py -k "$SSH_TAGGING_KEY" -o version -v
-
bash scripts/build.sh --version "$(cat version)"
artifacts
:
paths
:
-
version
-
build/**
prepare:beta
:
extends
:
.prepare
only
:
-
master
-
beta
prepare:release
:
extends
:
.prepare
<<
:
*release_rules
# Stage: build
#
# Builds packages from the prepared unpacked extensions.
.build:firefox
:
stage
:
build
...
...
@@ -44,16 +57,16 @@ prepare:
-
npm install --global web-ext --cache "$CI_PROJECT_DIR/.cache/npm" --prefer-offline --no-audit
-
cd build/firefox
-
web-ext -a . sign --channel=$CHANNEL
-
mv atp_safe_links_cleaner* ../../safelinks-cleaner-firefox.xpi
-
mv atp_safe_links_cleaner* ../../safelinks-cleaner-firefox
-$VARIANT
.xpi
artifacts
:
paths
:
-
safelinks-cleaner-firefox.xpi
build:firefox:beta
:
extends
:
.build:firefox
variables
:
CHANNEL
:
unlisted
VARIANT
:
beta
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"push"
&&
$CI_COMMIT_BRANCH
==
"beta"'
changes
:
...
...
@@ -64,34 +77,30 @@ build:firefox:beta:
when
:
always
-
when
:
never
build:firefox:master
:
build:firefox:release
:
extends
:
.build:firefox
variables
:
CHANNEL
:
listed
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"push"
&&
$CI_COMMIT_BRANCH
==
"master"'
changes
:
-
shared/**
-
firefox/**
when
:
always
-
if
:
'
$CI_COMMIT_MESSAGE
=~
/#force-build:(all|firefox)/
&&
$CI_COMMIT_BRANCH
==
"master"'
when
:
always
-
when
:
never
VARIANT
:
release
<<
:
*release_rules
build:thunderbird:
beta
:
.
build:thunderbird
:
stage
:
build
image
:
python:3.7-stretch
script
:
-
apt-get -y update
-
apt-get -y install zip
-
cd build/thunderbird
-
zip -r ../../safelinks-cleaner-thunderbird.xpi *
-
zip -r ../../safelinks-cleaner-thunderbird
-$VARIANT
.xpi *
artifacts
:
paths
:
-
safelinks-cleaner-thunderbird.xpi
-
safelinks-cleaner-thunderbird-$VARIANT.xpi
.build:thunderbird:beta
:
extends
:
.build:thunderbird
variables
:
VARIANT
:
beta
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"push"
&&
$CI_COMMIT_BRANCH
==
"beta"'
changes
:
...
...
@@ -102,23 +111,30 @@ build:thunderbird:beta:
when
:
always
-
when
:
never
.build:thunderbird:release
:
extends
:
.build:thunderbird
variables
:
VARIANT
:
release
<<
:
*release_rules
# Stage: collect/deploy
#
# Wait for build artifacts then deploy new beta version to pages.
collect
:
stage
:
collect
script
:
-
echo "done"
only
:
-
master
-
beta
pages
:
stage
:
deploy
script
:
-
cp -r site .public
-
sed -i -e "s/%BUILDDATE%/$(date +'%Y-%m-%d %H:%M')/g" .public/index.html
-
cp safelinks-cleaner-thunderbird.xpi .public
-
cp safelinks-cleaner-firefox.xpi .public
-
cp safelinks-cleaner-*.xpi .public
-
mv .public public
-
ls -lr public
needs
:
...
...
@@ -131,9 +147,8 @@ pages:
job
:
build:firefox:beta
ref
:
$CI_COMMIT_REF_NAME
artifacts
:
true
only
:
-
beta
artifacts
:
paths
:
-
public/
only
:
-
beta
when
:
always
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