Compare commits

..
Author SHA1 Message Date
marko 7ea84361a5 jenkinsfile: update with conditional steps
Signed-off-by: markoburcul <marko@status.im>
2024-10-11 12:10:36 +02:00
marko 252b462b71 testing: shouldn't trigger a build
Signed-off-by: markoburcul <marko@status.im>
2024-10-11 07:39:55 +02:00
marko b278b2034f test
Signed-off-by: markoburcul <marko@status.im>
2024-10-10 18:25:15 +02:00
5 changed files with 77 additions and 114 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
This monorepo contains packages for building web applications in the Status ecosystem. These packages can be used separately or combined to create consistent and beautiful user interfaces.
## Packages
test
| Name | `npm` | Description |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@status-im/components`](./packages/components) | [![npm version](https://img.shields.io/npm/v/@status-im/components)](https://www.npmjs.com/package/@status-im/components) | Component library built with Radix UI, React Aria, Tailwind CSS. |
+41 -2
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.9.11'
def changesDetected = false
pipeline {
agent { label 'linux' }
@@ -27,7 +29,20 @@ pipeline {
}
stages {
stage('Check changes') {
when {
changeset pattern: "apps/connector/**", comparator: "GLOB"
}
steps {
script {
changesDetected = true
}
}
}
stage('Install') {
when {
expression { changesDetected }
}
steps {
dir("${env.WORKSPACE}/apps/connector") {
script {
@@ -42,6 +57,9 @@ pipeline {
}
stage('Build') {
when {
expression { changesDetected }
}
steps {
dir("${env.WORKSPACE}/apps/connector") {
script {
@@ -56,6 +74,9 @@ pipeline {
}
stage('Zip') {
when {
expression { changesDetected }
}
steps {
dir("${env.WORKSPACE}/apps/connector") {
zip(
@@ -68,6 +89,9 @@ pipeline {
}
stage('Archive') {
when {
expression { changesDetected }
}
steps {
dir("${env.WORKSPACE}/apps/connector") {
archiveArtifacts(
@@ -79,6 +103,9 @@ pipeline {
}
stage('Upload') {
when {
expression { changesDetected }
}
steps {
dir("${env.WORKSPACE}/apps/connector") {
script {
@@ -90,8 +117,20 @@ pipeline {
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
success {
script {
if(changesDetected) {
github.notifyPR(true)
}
}
}
success {
script {
if(changesDetected) {
github.notifyPR(false)
}
}
}
cleanup { cleanWs() }
}
}
@@ -1,5 +1,3 @@
import { PlaceholderIcon } from '@status-im/icons/20'
import { Button } from './button'
import type { Meta, StoryObj } from '@storybook/react'
@@ -57,52 +55,6 @@ const meta: Meta<
))}
</div>
))}
{(
[
'primary',
'positive',
'grey',
'darkGrey',
'outline',
'ghost',
'danger',
] as const
).map(variant => (
<div key={variant} className="flex items-center gap-4">
{(['40', '32', '24'] as const).map(size => (
<Button
key={size}
{...args}
variant={variant}
size={size}
iconAfter={<PlaceholderIcon />}
/>
))}
</div>
))}
{(
[
'primary',
'positive',
'grey',
'darkGrey',
'outline',
'ghost',
'danger',
] as const
).map(variant => (
<div key={variant} className="flex items-center gap-4">
{(['40', '32', '24'] as const).map(size => (
<Button
key={size}
{...args}
variant={variant}
size={size}
iconBefore={<PlaceholderIcon />}
/>
))}
</div>
))}
</div>
),
}
+34 -63
View File
@@ -69,19 +69,18 @@ function Button(
onClick={onClick}
{...buttonProps}
ref={ref}
className={styles({
variant,
size,
iconPlacement:
(iconBefore && 'before') || (iconAfter && 'after') || 'unset',
})}
className={styles({ variant, size })}
>
{iconBefore && (
<span className={iconStyles({ size, variant })}>{iconBefore}</span>
<span className={iconStyles({ size, placement: 'before', variant })}>
{iconBefore}
</span>
)}
<span className="flex-1 whitespace-nowrap">{children}</span>
{iconAfter && (
<span className={iconStyles({ size, variant })}>{iconAfter}</span>
<span className={iconStyles({ size, placement: 'after', variant })}>
{iconAfter}
</span>
)}
</Element>
)
@@ -127,67 +126,15 @@ const styles = cva({
'dark:bg-danger-60 dark:hover:bg-danger-50 dark:pressed:bg-danger-50/[.9]',
],
},
iconPlacement: {
before: '',
after: '',
unset: '',
},
size: {
'40': 'h-[40px] rounded-12 text-15',
'32': 'h-[32px] rounded-10 text-15',
'24': 'h-[24px] rounded-8 text-13',
'40': 'h-[40px] rounded-12 px-4 text-15',
'32': 'h-[32px] rounded-10 px-3 text-15',
'24': 'h-[24px] rounded-8 px-2 text-13',
},
iconOnly: {
true: 'aspect-square !px-0',
},
},
compoundVariants: [
{
size: '40',
iconPlacement: 'unset',
className: 'px-4',
},
{
size: '32',
iconPlacement: 'unset',
className: 'px-3',
},
{
size: '24',
iconPlacement: 'unset',
className: 'px-2',
},
{
size: '40',
iconPlacement: 'before',
className: 'pl-3 pr-4',
},
{
size: '40',
iconPlacement: 'after',
className: 'pl-4 pr-3',
},
{
size: '32',
iconPlacement: 'before',
className: 'pl-2 pr-3',
},
{
size: '32',
iconPlacement: 'after',
className: 'pl-3 pr-2',
},
{
size: '24',
iconPlacement: 'before',
className: 'pl-1.5 pr-2',
},
{
size: '24',
iconPlacement: 'after',
className: 'pl-2 pr-1.5',
},
],
})
const iconStyles = cva({
@@ -212,6 +159,10 @@ const iconStyles = cva({
ghost: ['text-neutral-50'],
danger: ['text-blur-white/70'],
},
placement: {
before: '',
after: '',
},
size: {
'40': 'size-5',
'32': 'size-5',
@@ -222,6 +173,26 @@ const iconStyles = cva({
},
},
compoundVariants: [
{
size: ['40', '32'],
placement: 'before',
className: '-ml-1',
},
{
size: ['40', '32'],
placement: 'after',
className: '-mr-1',
},
{
size: '24',
placement: 'before',
className: '-ml-0.5',
},
{
size: '24',
placement: 'after',
className: '-mr-0.5',
},
{
variant: 'outline',
iconOnly: true,
+1
View File
@@ -0,0 +1 @@
test