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
| # stage1 as builder | |
| FROM node:lts-alpine as builder | |
| # copy the package.json to install dependencies | |
| COPY package.json package-lock.json ./ | |
| # Install the dependencies and make the folder | |
| RUN npm install && mkdir /react-ui && mv ./node_modules ./react-ui | |
| WORKDIR /react-ui |
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
| // Related to https://issues.jenkins-ci.org/browse/JENKINS-26481 | |
| abcs = ['a', 'b', 'c'] | |
| node('master') { | |
| stage('Test 1: loop of echo statements') { | |
| echo_all(abcs) | |
| } | |
| stage('Test 2: loop of sh commands') { |
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
| #!groovy | |
| String GIT_VERSION | |
| node { | |
| def buildEnv | |
| def devAddress | |
| stage ('Checkout') { |
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
| pipeline { | |
| agent { node { label 'swarm-ci' } } | |
| environment { | |
| TEST_PREFIX = "test-IMAGE" | |
| TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
| TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
| REGISTRY_ADDRESS = "my.registry.address.com" | |
| SLACK_CHANNEL = "#deployment-notifications" |
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
| #!/bin/bash | |
| ############################################################### | |
| # Docker userns-remap and system users on Linux | |
| ############################################################### | |
| groupadd -g 500000 dockremap && | |
| groupadd -g 501000 dockremap-user && | |
| useradd -u 500000 -g dockremap -s /bin/false dockremap && |
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
| wget https://gitlab.com/gitlab-org/docker-distribution-pruner/-/jobs/142025596/artifacts/raw/docker-distribution-pruner | |
| EXPERIMENTAL=true ./docker-distribution-pruner -config=/var/opt/gitlab/registry/config.yml -delete -soft-delete=false -soft-errors |
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
| gitlab-rails dbconsole | |
| UPDATE projects SET runners_token = null, runners_token_encrypted = null; | |
| UPDATE application_settings SET runners_registration_token_encrypted = null; | |
| UPDATE namespaces SET runners_token = null, runners_token_encrypted = null; | |
| UPDATE ci_runners SET token = null, token_encrypted = null; | |
| UPDATE ci_builds SET token = null, token_encrypted = null; |
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
| docker run --rm -v myvolume:/tmp/src -v /tmp/:/tmp/dest -u root alpine tar -czvf /tmp/dest/mybackup.tar.gz /tmp/src/ | |
| docker run -v myvolume:/volume -v /tmp:/backup --rm loomchild/volume-backup backup my-volume | |
| docker run -v myvolume:/volume -v /tmp:/backup --rm loomchild/volume-backup restore my-volume |
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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: nginx-conf | |
| data: | |
| nginx.conf: | | |
| user nginx; | |
| worker_processes 3; | |
| error_log /var/log/nginx/error.log; | |
| events { |
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
| Some Jenkinsfile examples |
OlderNewer