This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from ( | |
SELECT id, | |
ROW_NUMBER() OVER(PARTITION BY <column>, <column> ORDER BY id asc) AS Row | |
FROM <table_name> | |
) dups | |
where | |
dups.Row > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1st Stage for installing dependencies | |
FROM node:10.16.3 AS build-deps | |
COPY package*.json /build/ | |
WORKDIR /build | |
RUN npm install | |
# 2nd Stage for compiling typescript | |
FROM node:10.16.3 AS compile-env | |
RUN mkdir /compile | |
COPY --from=build-deps /build /compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage('commit if changed') { | |
sh 'git diff --quiet && git diff --staged --quiet || git commit -am "chore: commit pipeline changes"' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const config = require('config'); | |
const { hashElement } = require('folder-hash'); | |
const base = require('./webpack.base'); | |
const packageJson = require('./package.json'); | |
const definePluginConfig = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
nodejs('[email protected]') { | |
stage('checkout') { | |
checkout([ | |
$class: 'GitSCM', | |
branches: [[name: '*/development']], // solves detached head issue | |
extensions: [[$class: 'LocalBranch', localBranch: '**']], // required to push changes to remote repo | |
userRemoteConfigs: scm.userRemoteConfigs | |
]) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
(0..0).each do |i| | |
config.vm.define "utility" do |node| | |
node.vm.box = "ubuntu/xenial64" | |
node.vm.provision "shell", inline: "apt-get update -y && \ | |
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common && \ | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \ | |
apt-key fingerprint 0EBFCD88 && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage('Version') { | |
env.Version=readJSON(file: 'package.json').version | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add credentials on build | |
ARG SSH_PRIVATE_KEY | |
RUN mkdir /root/.ssh/ | |
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa | |
RUN chmod 600 /root/.ssh/id_rsa | |
# make sure your domain is accepted | |
RUN touch /root/.ssh/known_hosts | |
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts |