Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] Do not merge #63

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ eks_container_definition: &CONTAINER_DEFINITION
cluster_name: ${CIRRUS_CLUSTER_NAME}
region: eu-central-1
namespace: default
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}

build_task:
auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH != 'stable'
eks_container:
<<: *CONTAINER_DEFINITION
builder_role: cirrus-builder
builder_image: docker-builder-v*
builder_instance_type: t2.small
dockerfile: .cirrus/Dockerfile
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
cpu: 2
memory: 2G
env:
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
SONAR_HOST_URL: VAULT[development/kv/data/sonarcloud data.url]
Expand All @@ -39,8 +37,8 @@ build_task:
- npm ci

build_script:
- source cirrus-env BUILD
- ./.cirrus/npm_build_deploy_analyze
- source .cirrus/cirrus-env BUILD
- .cirrus/yarn_build_deploy_analyze

promote_task:
depends_on:
Expand Down
28 changes: 0 additions & 28 deletions .cirrus/Dockerfile

This file was deleted.

20 changes: 20 additions & 0 deletions .cirrus/includes/cirrus-env → .cirrus/cirrus-env
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
#!/bin/bash

# The first argument is the task type (e.g. BUILD or QA)
# If it is not BUILD, then the SONARSOURCE_QA environment variable is set to true
# This has an effect if the pom.xml contains the following snippet:
# <project...>
# ...
# <profiles>
# <profile>
# <id>qa</id>
# <activation>
# <property>
# <name>env.SONARSOURCE_QA</name>
# <value>true</value>
# </property>
# </activation>
# ...
# </profile>
# </profiles>
# </project>
# This usually changes the way the project is built.

set +o verbose
set -euo pipefail

Expand Down
1 change: 0 additions & 1 deletion .cirrus/npm_version_utils
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PACKAGE_JSON="package.json"

function get_current_version() {
CURRENT_VERSION=$(jq -r .version "$PACKAGE_JSON")

if [ -z "$CURRENT_VERSION" ] || [ "$CURRENT_VERSION" == "null" ]; then
echo "Could not get version from $PACKAGE_JSON" >&2
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ source "$(dirname "$0")"/includes/git_utils
source "$(dirname "$0")"/includes/version_util
source "$(dirname "$0")"/analyze
source "$(dirname "$0")"/npm_deploy

source "$(dirname "$0")"/npm_version_utils


Expand All @@ -21,12 +20,12 @@ if is_master_branch && ! is_pull_request; then
echo "Current version: $CURRENT_VERSION"

set_npm_version_with_build_id "$BUILD_NUMBER"
echo "Set npm version with build ID: $BUILD_NUMBER."
echo "Set yarn version with build ID: $BUILD_NUMBER."

check_version_format "$PROJECT_VERSION"
echo "Checked version format: $PROJECT_VERSION."

echo "Installing npm dependencies..."
echo "Installing yarn dependencies..."
yarn install --immutable

echo "Running tests..."
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sonarsource/sonar-dummy-js",
"version": "2.0.0-SNAPSHOT",
"version": "2.1.0-SNAPSHOT",
"description": "Dummy project making use of SonarSource organization tools for releasing NPM projects",
"main": "src/index.js",
"scripts": {
Expand Down
Loading